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)
This commit is contained in:
Micah Stanley 2025-04-25 12:39:05 +00:00
parent 6e0dca9702
commit 5fade2d5eb

View file

@ -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();
}
});