Skip to content

Commit

Permalink
only clear highlighting when no edit is selected if the edit history …
Browse files Browse the repository at this point in the history
…sidebar is open (fixes #5995)
  • Loading branch information
westnordost committed Nov 13, 2024
1 parent 620fcb4 commit 02860fb
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,15 @@ class MainActivity :
sheetBackPressedCallback.isEnabled = bottomSheetFragment is IsCloseableBottomSheet

observe(editHistoryViewModel.selectedEdit) { edit ->
if (edit == null) {
mapFragment?.clearFocus()
mapFragment?.clearHighlighting()
} else {
if (edit != null) {
val geometry = editHistoryViewModel.getEditGeometry(edit)
mapFragment?.startFocus(geometry, Insets.NONE)
mapFragment?.highlightGeometry(geometry)
mapFragment?.highlightPins(edit.icon, listOf(edit.position))
mapFragment?.hideOverlay()
} else if (editHistoryViewModel.isShowingSidebar.value) {
mapFragment?.clearFocus()
mapFragment?.clearHighlighting()
}
}
observe(editHistoryViewModel.isShowingSidebar) { isShowingSidebar ->
Expand Down

0 comments on commit 02860fb

Please sign in to comment.