From 5fade2d5eb1627a1cc73591bc2e4a2edef7c1186 Mon Sep 17 00:00:00 2001 From: Micah Stanley Date: Fri, 25 Apr 2025 12:39:05 +0000 Subject: [PATCH] Folio: Search Widget View State Bugfix Fixes a bug where if one swipes up from the app drawer and immediately swipes up again to the search widget, then lets the widget fully appear, then after that at any point swipes down to dismiss it, it will cause the swipe action to reveal the app drawer instead of the home screen. This was resolved by making sure when `closeAppDrawerAnim` is active, to only set the view state to `PageView` if the view state equals `AppDrawerView`. This prevents `closeAppDrawerAnim` from overwriting the `SearchWidgetView` state and making it seem to think we are still on the home screen when swiping down. Here is a video of the bug in question. ![Screencast_20250424_225241__online-video-cutter.com_](/uploads/f5d03324850688028628ef8fc18f6c28/Screencast_20250424_225241__online-video-cutter.com_.mp4) --- containments/homescreens/folio/homescreenstate.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/containments/homescreens/folio/homescreenstate.cpp b/containments/homescreens/folio/homescreenstate.cpp index 9c09daa9..29a20b2d 100644 --- a/containments/homescreens/folio/homescreenstate.cpp +++ b/containments/homescreens/folio/homescreenstate.cpp @@ -57,7 +57,10 @@ void HomeScreenState::init() // the animation runs too long to connect to QPropertyAnimation::finished // instead just have the end behaviour execute once we are 90% through if (m_appDrawerOpenProgress < 0.1) { - setViewState(ViewState::PageView); + if (m_viewState == ViewState::AppDrawerView) { + // confirm view state is still AppDrawerView before setting to prevent oddities + setViewState(ViewState::PageView); + } Q_EMIT appDrawerClosed(); } });