Skip to content

Commit

Permalink
fixes #5498
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Mar 3, 2024
1 parent fa8da80 commit 4a0bb0c
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,12 @@ class MainFragment :
private fun showEditHistorySidebar() {
val appearAnim = R.animator.edit_history_sidebar_appear
val disappearAnim = R.animator.edit_history_sidebar_disappear
if (editHistoryFragment != null) {
childFragmentManager.popBackStack(EDIT_HISTORY, FragmentManager.POP_BACK_STACK_INCLUSIVE)
}
childFragmentManager.commit(true) {
setCustomAnimations(appearAnim, disappearAnim, appearAnim, disappearAnim)
replace(R.id.edit_history_container, EditHistoryFragment(), EDIT_HISTORY)
add(R.id.edit_history_container, EditHistoryFragment(), EDIT_HISTORY)
addToBackStack(EDIT_HISTORY)
}
mapFragment?.hideOverlay()
Expand Down Expand Up @@ -944,14 +947,15 @@ class MainFragment :
private fun showInBottomSheet(f: Fragment, clearPreviousHighlighting: Boolean = true) {
activity?.currentFocus?.hideKeyboard()
freezeMap()
if (bottomSheetFragment != null && clearPreviousHighlighting) {
clearHighlighting()
if (bottomSheetFragment != null) {
if (clearPreviousHighlighting) clearHighlighting()
childFragmentManager.popBackStack(BOTTOM_SHEET, FragmentManager.POP_BACK_STACK_INCLUSIVE)
}
val appearAnim = R.animator.quest_answer_form_appear
val disappearAnim = R.animator.quest_answer_form_disappear
childFragmentManager.commit(true) {
setCustomAnimations(appearAnim, disappearAnim, appearAnim, disappearAnim)
replace(R.id.map_bottom_sheet_container, f, BOTTOM_SHEET)
add(R.id.map_bottom_sheet_container, f, BOTTOM_SHEET)
addToBackStack(BOTTOM_SHEET)
}
sheetBackPressedCallback.isEnabled = f is IsCloseableBottomSheet
Expand Down

0 comments on commit 4a0bb0c

Please sign in to comment.