Fix native crash (need more testing).
This commit is contained in:
parent
3994373387
commit
c81654d769
@ -43,7 +43,7 @@ data class LocationData(
|
||||
val latitude = geoParts?.firstOrNull()
|
||||
val geoTailParts = geoParts?.getOrNull(1)?.split(";")
|
||||
val longitude = geoTailParts?.firstOrNull()
|
||||
val uncertainty = geoTailParts?.getOrNull(1)
|
||||
val uncertainty = geoTailParts?.getOrNull(1)?.replace("u=", "")
|
||||
|
||||
return if (latitude != null && longitude != null) {
|
||||
LocationData(
|
||||
|
@ -49,6 +49,11 @@ class LocationPreviewFragment @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
views.mapView.onPause()
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
override fun getMenuRes() = R.menu.menu_location_preview
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
@ -67,6 +72,8 @@ class LocationPreviewFragment @Inject constructor(
|
||||
}
|
||||
|
||||
private fun onMapReady() {
|
||||
if (!isAdded) return
|
||||
|
||||
val location = args.initialLocationData ?: return
|
||||
val userId = args.locationOwnerId
|
||||
|
||||
|
@ -69,12 +69,19 @@ class LocationSharingFragment @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
override fun onPause() {
|
||||
views.mapView.onPause()
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
locationTracker.stop()
|
||||
}
|
||||
|
||||
private fun onMapReady() {
|
||||
if (!isAdded) return
|
||||
|
||||
locationPinProvider.create(session.myUserId) {
|
||||
views.mapView.addPinToMap(
|
||||
pinId = USER_PIN_NAME,
|
||||
|
Loading…
x
Reference in New Issue
Block a user