Fix issue #15
This commit is contained in:
		
							
								
								
									
										17
									
								
								.idea/deploymentTargetDropDown.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								.idea/deploymentTargetDropDown.xml
									
									
									
										generated
									
									
									
										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) { | ||||
|             binding.collapsingToolbar.setTitle(item.getName() != null ? item.getName() : getString(R.string.new_geobookmark)); | ||||
|             binding.nameEt.setText(item.getName()); | ||||
|             binding.descriptionEt.setText(item.getComment()); | ||||
|             binding.nameEt.setText(item.getName() != null ? item.getName() : ""); | ||||
|             binding.descriptionEt.setText(item.getComment() != null ? item.getComment() : ""); | ||||
|             binding.createdTv.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); | ||||
|         } | ||||
|  | ||||
|   | ||||
| @@ -345,7 +345,7 @@ public class MainActivity extends NextcloudMapsStyledActivity implements OnSorti | ||||
|  | ||||
|     private void showGeofavoriteDeteleDialog(Geofavorite item) { | ||||
|         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) | ||||
|                 .setPositiveButton(R.string.dialog_delete_delete, new DialogInterface.OnClickListener() { | ||||
|                     public void onClick(DialogInterface dialog, int id) { | ||||
|   | ||||
| @@ -162,7 +162,9 @@ public class GeofavoriteRepository { | ||||
|     private void updateCategories(List<Geofavorite> geofavs) { | ||||
|         HashSet<String> categories = new HashSet<>(); | ||||
|         for (Geofavorite g : geofavs) { | ||||
|             categories.add(g.getCategory()); | ||||
|             String cat = g.getCategory(); | ||||
|             if (cat != null) | ||||
|                 categories.add(cat); | ||||
|         } | ||||
|         mCategories.postValue(categories); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user