Code review fixes.
This commit is contained in:
parent
33e5a206bd
commit
a13ba13fb5
@ -128,6 +128,7 @@ fun checkPermissions(permissionsToBeGranted: List<String>,
|
|||||||
.setPositiveButton(R.string.ok) { _, _ ->
|
.setPositiveButton(R.string.ok) { _, _ ->
|
||||||
activityResultLauncher.launch(missingPermissions.toTypedArray())
|
activityResultLauncher.launch(missingPermissions.toTypedArray())
|
||||||
}
|
}
|
||||||
|
.setNegativeButton(R.string.action_not_now, null)
|
||||||
.show()
|
.show()
|
||||||
} else {
|
} else {
|
||||||
// some permissions are not granted, ask permissions
|
// some permissions are not granted, ask permissions
|
||||||
|
@ -19,7 +19,7 @@ package im.vector.app.features.location
|
|||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import im.vector.app.core.utils.openAppSettingsPage
|
import im.vector.app.core.utils.openAppSettingsPage
|
||||||
|
|
||||||
class DefaultLocationSharingSettingsNavigator constructor(val activity: Activity?) : LocationSharingSettingsNavigator {
|
class DefaultLocationSharingNavigator constructor(val activity: Activity?) : LocationSharingNavigator {
|
||||||
|
|
||||||
override var goingToAppSettings: Boolean = false
|
override var goingToAppSettings: Boolean = false
|
||||||
|
|
@ -54,7 +54,7 @@ class LocationSharingFragment @Inject constructor(
|
|||||||
|
|
||||||
private val viewModel: LocationSharingViewModel by fragmentViewModel()
|
private val viewModel: LocationSharingViewModel by fragmentViewModel()
|
||||||
|
|
||||||
private val locationSharingNavigator: LocationSharingSettingsNavigator by lazy { DefaultLocationSharingSettingsNavigator(activity) }
|
private val locationSharingNavigator: LocationSharingNavigator by lazy { DefaultLocationSharingNavigator(activity) }
|
||||||
|
|
||||||
// Keep a ref to handle properly the onDestroy callback
|
// Keep a ref to handle properly the onDestroy callback
|
||||||
private var mapView: WeakReference<MapView>? = null
|
private var mapView: WeakReference<MapView>? = null
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package im.vector.app.features.location
|
package im.vector.app.features.location
|
||||||
|
|
||||||
interface LocationSharingSettingsNavigator {
|
interface LocationSharingNavigator {
|
||||||
var goingToAppSettings: Boolean
|
var goingToAppSettings: Boolean
|
||||||
fun quit()
|
fun quit()
|
||||||
fun goToAppSettings()
|
fun goToAppSettings()
|
Loading…
Reference in New Issue
Block a user