mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +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 detachView();
|
||||||
|
|
||||||
void setActionListeners(JsonKvStore applicationKvStore);
|
void setActionListeners(JsonKvStore applicationKvStore);
|
||||||
|
void removeNearbyPreferences(JsonKvStore applicationKvStore);
|
||||||
boolean backButtonClicked();
|
boolean backButtonClicked();
|
||||||
void onCameraMove(com.mapbox.mapboxsdk.geometry.LatLng latLng);
|
void onCameraMove(com.mapbox.mapboxsdk.geometry.LatLng latLng);
|
||||||
void filterByMarkerType(List<Label> selectedLabels, int state, boolean filterForPlaceState, boolean filterForAllNoneType);
|
void filterByMarkerType(List<Label> selectedLabels, int state, boolean filterForPlaceState, boolean filterForAllNoneType);
|
||||||
|
|
|
||||||
|
|
@ -435,6 +435,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
mapView.onDestroy();
|
mapView.onDestroy();
|
||||||
|
presenter.removeNearbyPreferences(applicationKvStore);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initViews() {
|
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.CHECKED;
|
||||||
import static fr.free.nrw.commons.nearby.CheckBoxTriStates.UNCHECKED;
|
import static fr.free.nrw.commons.nearby.CheckBoxTriStates.UNCHECKED;
|
||||||
import static fr.free.nrw.commons.nearby.CheckBoxTriStates.UNKNOWN;
|
import static fr.free.nrw.commons.nearby.CheckBoxTriStates.UNKNOWN;
|
||||||
|
import static fr.free.nrw.commons.wikidata.WikidataConstants.PLACE_OBJECT;
|
||||||
|
|
||||||
public class NearbyParentFragmentPresenter
|
public class NearbyParentFragmentPresenter
|
||||||
implements NearbyParentFragmentContract.UserActions,
|
implements NearbyParentFragmentContract.UserActions,
|
||||||
|
|
@ -83,6 +84,12 @@ public class NearbyParentFragmentPresenter
|
||||||
this.nearbyParentFragmentView=DUMMY;
|
this.nearbyParentFragmentView=DUMMY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeNearbyPreferences(JsonKvStore applicationKvStore) {
|
||||||
|
Timber.d("Remove place objects");
|
||||||
|
applicationKvStore.remove(PLACE_OBJECT);
|
||||||
|
}
|
||||||
|
|
||||||
public void initializeMapOperations() {
|
public void initializeMapOperations() {
|
||||||
lockUnlockNearby(false);
|
lockUnlockNearby(false);
|
||||||
updateMapAndList(LOCATION_SIGNIFICANTLY_CHANGED);
|
updateMapAndList(LOCATION_SIGNIFICANTLY_CHANGED);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue