mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +03:00
Inform the user when the location provider is disabled.
This commit is contained in:
parent
7242f1c2f1
commit
db3f60b4b1
1 changed files with 4 additions and 0 deletions
|
@ -83,6 +83,10 @@ class LocationTracker @Inject constructor(
|
|||
callback?.onLocationUpdate(location.toLocationData())
|
||||
}
|
||||
|
||||
override fun onProviderDisabled(provider: String) {
|
||||
callback?.onLocationProviderIsNotAvailable()
|
||||
}
|
||||
|
||||
private fun Location.toLocationData(): LocationData {
|
||||
return LocationData(latitude, longitude, accuracy.toDouble())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue