mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
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. 
This commit is contained in:
parent
6e0dca9702
commit
5fade2d5eb
1 changed files with 4 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue