Fix issue #15
This commit is contained in:
parent
a13e601eea
commit
cf7d38d872
17
.idea/deploymentTargetDropDown.xml
Normal file
17
.idea/deploymentTargetDropDown.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="deploymentTargetDropDown">
|
||||||
|
<targetSelectedWithDropDown>
|
||||||
|
<Target>
|
||||||
|
<type value="QUICK_BOOT_TARGET" />
|
||||||
|
<deviceKey>
|
||||||
|
<Key>
|
||||||
|
<type value="VIRTUAL_DEVICE_PATH" />
|
||||||
|
<value value="$USER_HOME$/.android/avd/Pixel_5_API_29.avd" />
|
||||||
|
</Key>
|
||||||
|
</deviceKey>
|
||||||
|
</Target>
|
||||||
|
</targetSelectedWithDropDown>
|
||||||
|
<timeTargetWasSelectedWithDropDown value="2023-02-15T07:23:10.782369Z" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -336,11 +336,11 @@ public class GeofavoriteDetailActivity extends NextcloudMapsStyledActivity imple
|
|||||||
|
|
||||||
public void updateView(Geofavorite item) {
|
public void updateView(Geofavorite item) {
|
||||||
binding.collapsingToolbar.setTitle(item.getName() != null ? item.getName() : getString(R.string.new_geobookmark));
|
binding.collapsingToolbar.setTitle(item.getName() != null ? item.getName() : getString(R.string.new_geobookmark));
|
||||||
binding.nameEt.setText(item.getName());
|
binding.nameEt.setText(item.getName() != null ? item.getName() : "");
|
||||||
binding.descriptionEt.setText(item.getComment());
|
binding.descriptionEt.setText(item.getComment() != null ? item.getComment() : "");
|
||||||
binding.createdTv.setText(item.getLocalDateCreated().format(dateFormatter));
|
binding.createdTv.setText(item.getLocalDateCreated().format(dateFormatter));
|
||||||
binding.modifiedTv.setText(item.getLocalDateCreated().format(dateFormatter));
|
binding.modifiedTv.setText(item.getLocalDateCreated().format(dateFormatter));
|
||||||
binding.categoryAt.setText(item.getCategory());
|
binding.categoryAt.setText(item.getCategory() != null ? item.getCategory() : Geofavorite.DEFAULT_CATEGORY);
|
||||||
updateViewCoords(item);
|
updateViewCoords(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,7 +345,7 @@ public class MainActivity extends NextcloudMapsStyledActivity implements OnSorti
|
|||||||
|
|
||||||
private void showGeofavoriteDeteleDialog(Geofavorite item) {
|
private void showGeofavoriteDeteleDialog(Geofavorite item) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
|
||||||
builder.setMessage(getString(R.string.dialog_delete_message).replace("{name}", item.getName()))
|
builder.setMessage(getString(R.string.dialog_delete_message).replace("{name}", item.getName() != null ? item.getName() : ""))
|
||||||
.setTitle(R.string.dialog_delete_title)
|
.setTitle(R.string.dialog_delete_title)
|
||||||
.setPositiveButton(R.string.dialog_delete_delete, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.dialog_delete_delete, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
|
@ -162,7 +162,9 @@ public class GeofavoriteRepository {
|
|||||||
private void updateCategories(List<Geofavorite> geofavs) {
|
private void updateCategories(List<Geofavorite> geofavs) {
|
||||||
HashSet<String> categories = new HashSet<>();
|
HashSet<String> categories = new HashSet<>();
|
||||||
for (Geofavorite g : geofavs) {
|
for (Geofavorite g : geofavs) {
|
||||||
categories.add(g.getCategory());
|
String cat = g.getCategory();
|
||||||
|
if (cat != null)
|
||||||
|
categories.add(cat);
|
||||||
}
|
}
|
||||||
mCategories.postValue(categories);
|
mCategories.postValue(categories);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user