Fixed unnecessary reloads on onResume

This commit is contained in:
Kanahia 2024-05-29 12:25:15 +05:30
parent 8315777318
commit 13a390a860

View file

@ -596,7 +596,9 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
registerNetworkReceiver();
if (isResumed() && ((MainActivity) getActivity()).activeFragment == ActiveFragment.NEARBY) {
if (locationPermissionsHelper.checkLocationPermission(getActivity())) {
locationPermissionGranted();
if (lastFocusLocation == null && lastKnownLocation == null) {
locationPermissionGranted();
}
} else {
startMapWithoutPermission();
}