diff --git a/app/src/main/java/com/quillstudios/pokegoalshelper/ui/ResultsBottomDrawer.kt b/app/src/main/java/com/quillstudios/pokegoalshelper/ui/ResultsBottomDrawer.kt index 1472af2..295db63 100644 --- a/app/src/main/java/com/quillstudios/pokegoalshelper/ui/ResultsBottomDrawer.kt +++ b/app/src/main/java/com/quillstudios/pokegoalshelper/ui/ResultsBottomDrawer.kt @@ -767,14 +767,22 @@ class ResultsBottomDrawer(private val context: Context) { val deltaY = event.rawY - initialTouchY - if (deltaY > SWIPE_THRESHOLD && isExpanded) + if (deltaY > SWIPE_THRESHOLD) { - // Only collapse to minimal state if expanded, never fully dismiss - collapseDrawer() - ObjectAnimator.ofFloat(view, "translationY", view.translationY, initialTranslationY).apply { - duration = 200L - interpolator = AccelerateDecelerateInterpolator() - start() + if (isExpanded) + { + // Collapse to minimal state if expanded + collapseDrawer() + ObjectAnimator.ofFloat(view, "translationY", view.translationY, initialTranslationY).apply { + duration = 200L + interpolator = AccelerateDecelerateInterpolator() + start() + } + } + else + { + // Fully dismiss if collapsed and swiped down far enough + hide() } } else if (deltaY < EXPAND_THRESHOLD && !isExpanded)