mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fix: Restrict location permission prompt to Map tab in Explore section
This commit is contained in:
parent
c4bf715c96
commit
4543ee8547
1 changed files with 3 additions and 3 deletions
|
|
@ -269,7 +269,7 @@ class ExploreMapFragment : CommonsDaggerSupportFragment(), ExploreMapContract.Vi
|
||||||
|
|
||||||
override fun onZoom(event: ZoomEvent?): Boolean = false
|
override fun onZoom(event: ZoomEvent?): Boolean = false
|
||||||
})
|
})
|
||||||
// Remove the permission check here to prevent it from running on fragment creation
|
// removed tha permission check here to prevent it from running on fragment creation
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
|
|
@ -290,7 +290,7 @@ class ExploreMapFragment : CommonsDaggerSupportFragment(), ExploreMapContract.Vi
|
||||||
}
|
}
|
||||||
|
|
||||||
fun requestLocationIfNeeded() {
|
fun requestLocationIfNeeded() {
|
||||||
if (!isVisible) return // Skip if not visible to user
|
if (!isVisible) return // skips if not visible to user
|
||||||
if (locationPermissionsHelper!!.checkLocationPermission(requireActivity())) {
|
if (locationPermissionsHelper!!.checkLocationPermission(requireActivity())) {
|
||||||
if (locationPermissionsHelper!!.isLocationAccessToAppsTurnedOn()) {
|
if (locationPermissionsHelper!!.isLocationAccessToAppsTurnedOn()) {
|
||||||
locationManager.registerLocationManager()
|
locationManager.registerLocationManager()
|
||||||
|
|
@ -834,7 +834,7 @@ class ExploreMapFragment : CommonsDaggerSupportFragment(), ExploreMapContract.Vi
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the specific Mediaa object from the mediaList field.
|
* Retrieves the specific Media object from the mediaList field.
|
||||||
* @param url The specific Media's image URL.
|
* @param url The specific Media's image URL.
|
||||||
* @return The Media object that matches the URL or null if it could not be found.
|
* @return The Media object that matches the URL or null if it could not be found.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue