mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +01:00 
			
		
		
		
	Fixes #2803 - Cancel nearby upload -> Next upload gets the same title/description
This commit is contained in:
		
							parent
							
								
									6be9317eac
								
							
						
					
					
						commit
						e82fdd0f4f
					
				
					 3 changed files with 9 additions and 0 deletions
				
			
		|  | @ -89,6 +89,7 @@ public interface NearbyParentFragmentContract { | |||
|         void detachView(); | ||||
| 
 | ||||
|         void setActionListeners(JsonKvStore applicationKvStore); | ||||
|         void removeNearbyPreferences(JsonKvStore applicationKvStore); | ||||
|         boolean backButtonClicked(); | ||||
|         void onCameraMove(com.mapbox.mapboxsdk.geometry.LatLng latLng); | ||||
|         void filterByMarkerType(List<Label> selectedLabels, int state, boolean filterForPlaceState, boolean filterForAllNoneType); | ||||
|  |  | |||
|  | @ -435,6 +435,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment | |||
|     public void onDestroyView() { | ||||
|         super.onDestroyView(); | ||||
|         mapView.onDestroy(); | ||||
|         presenter.removeNearbyPreferences(applicationKvStore); | ||||
|     } | ||||
| 
 | ||||
|     private void initViews() { | ||||
|  |  | |||
|  | @ -33,6 +33,7 @@ import static fr.free.nrw.commons.location.LocationServiceManager.LocationChange | |||
| import static fr.free.nrw.commons.nearby.CheckBoxTriStates.CHECKED; | ||||
| import static fr.free.nrw.commons.nearby.CheckBoxTriStates.UNCHECKED; | ||||
| import static fr.free.nrw.commons.nearby.CheckBoxTriStates.UNKNOWN; | ||||
| import static fr.free.nrw.commons.wikidata.WikidataConstants.PLACE_OBJECT; | ||||
| 
 | ||||
| public class NearbyParentFragmentPresenter | ||||
|         implements NearbyParentFragmentContract.UserActions, | ||||
|  | @ -83,6 +84,12 @@ public class NearbyParentFragmentPresenter | |||
|         this.nearbyParentFragmentView=DUMMY; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public void removeNearbyPreferences(JsonKvStore applicationKvStore) { | ||||
|         Timber.d("Remove place objects"); | ||||
|         applicationKvStore.remove(PLACE_OBJECT); | ||||
|     } | ||||
| 
 | ||||
|     public void initializeMapOperations() { | ||||
|         lockUnlockNearby(false); | ||||
|         updateMapAndList(LOCATION_SIGNIFICANTLY_CHANGED); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Pratham Pahariya
						Pratham Pahariya