mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-01 07:13:56 +01:00
Changed lastLocation visibility
This commit is contained in:
parent
4148049156
commit
174793bd4b
2 changed files with 3 additions and 3 deletions
|
|
@ -423,7 +423,7 @@ class LocationPickerActivity : BaseActivity(), LocationPermissionCallback {
|
||||||
* Moves map to GPS location
|
* Moves map to GPS location
|
||||||
*/
|
*/
|
||||||
private fun moveMapToGPSLocation() {
|
private fun moveMapToGPSLocation() {
|
||||||
locationManager.lastLocationVar?.let {
|
locationManager.getLastLocation()?.let {
|
||||||
moveMapTo(GeoPoint(it.latitude, it.longitude))
|
moveMapTo(GeoPoint(it.latitude, it.longitude))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -606,7 +606,7 @@ class LocationPickerActivity : BaseActivity(), LocationPermissionCallback {
|
||||||
* Adds a marker at the user's GPS location
|
* Adds a marker at the user's GPS location
|
||||||
*/
|
*/
|
||||||
private fun addMarkerAtGPSLocation() {
|
private fun addMarkerAtGPSLocation() {
|
||||||
locationManager.lastLocationVar?.let {
|
locationManager.getLastLocation()?.let {
|
||||||
addLocationMarker(GeoPoint(it.latitude, it.longitude))
|
addLocationMarker(GeoPoint(it.latitude, it.longitude))
|
||||||
markerImage.translationY = 0f
|
markerImage.translationY = 0f
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ class LocationServiceManager(private val context: Context) : LocationListener {
|
||||||
|
|
||||||
private val locationManager: LocationManager =
|
private val locationManager: LocationManager =
|
||||||
context.getSystemService(Context.LOCATION_SERVICE) as LocationManager
|
context.getSystemService(Context.LOCATION_SERVICE) as LocationManager
|
||||||
var lastLocationVar: Location? = null
|
private var lastLocationVar: Location? = null
|
||||||
private val locationListeners = CopyOnWriteArrayList<LocationUpdateListener>()
|
private val locationListeners = CopyOnWriteArrayList<LocationUpdateListener>()
|
||||||
private var isLocationManagerRegistered = false
|
private var isLocationManagerRegistered = false
|
||||||
private val locationExplanationDisplayed = mutableSetOf<Activity>()
|
private val locationExplanationDisplayed = mutableSetOf<Activity>()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue