mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fix black map issue (#4040)
This commit is contained in:
parent
c93ab86d65
commit
ffdfb05d5f
1 changed files with 3 additions and 2 deletions
|
|
@ -82,6 +82,7 @@ import fr.free.nrw.commons.bookmarks.locations.BookmarkLocationsDao;
|
||||||
import fr.free.nrw.commons.contributions.ContributionController;
|
import fr.free.nrw.commons.contributions.ContributionController;
|
||||||
import fr.free.nrw.commons.contributions.ContributionsFragment;
|
import fr.free.nrw.commons.contributions.ContributionsFragment;
|
||||||
import fr.free.nrw.commons.contributions.MainActivity;
|
import fr.free.nrw.commons.contributions.MainActivity;
|
||||||
|
import fr.free.nrw.commons.contributions.MainActivity.ActiveFragment;
|
||||||
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
||||||
import fr.free.nrw.commons.kvstore.JsonKvStore;
|
import fr.free.nrw.commons.kvstore.JsonKvStore;
|
||||||
import fr.free.nrw.commons.location.LocationServiceManager;
|
import fr.free.nrw.commons.location.LocationServiceManager;
|
||||||
|
|
@ -333,7 +334,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
|
||||||
}
|
}
|
||||||
|
|
||||||
private void performMapReadyActions() {
|
private void performMapReadyActions() {
|
||||||
if (isVisible() && isMapBoxReady) {
|
if (((MainActivity)getActivity()).activeFragment == ActiveFragment.NEARBY && isMapBoxReady) {
|
||||||
checkPermissionsAndPerformAction(() -> {
|
checkPermissionsAndPerformAction(() -> {
|
||||||
lastKnownLocation = locationManager.getLastLocation();
|
lastKnownLocation = locationManager.getLastLocation();
|
||||||
fr.free.nrw.commons.location.LatLng target=lastFocusLocation;
|
fr.free.nrw.commons.location.LatLng target=lastFocusLocation;
|
||||||
|
|
@ -362,7 +363,7 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
|
||||||
mapView.onResume();
|
mapView.onResume();
|
||||||
presenter.attachView(this);
|
presenter.attachView(this);
|
||||||
registerNetworkReceiver();
|
registerNetworkReceiver();
|
||||||
if (isResumed() && isVisibleToUser) {
|
if (isResumed() && ((MainActivity)getActivity()).activeFragment == ActiveFragment.NEARBY) {
|
||||||
startTheMap();
|
startTheMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue