From dfd9c10589d25a966c7e2e4dedab57c59a1987fd Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sun, 27 Nov 2022 01:15:14 +0100 Subject: Eliminate skin updates in between activities 1) Adds way to pop activity without refreshing the skin at the same time. Activities are sometimes popped in immediate succession, or one activity is popped before another one is pushed right away. This can lead to the UI appearing glitchy, due to an activity only appearing for a split-second, which is especially noticeable with complex skins that change the dimensions of the UI viewport depending on the current activity To fix this, prevent superfluous skin updates * when switching between: - WPS and browser - WPS and Playlist Catalogue - WPS and playlist - WPS and Settings/System/Plugins * when accessing Track Info or when displaying bookmarks using the context menu on the WPS * when switching from QuickScreen to Shortcuts Menu 2) The playlist viewer activity was pushed & popped redundantly by playlist_view. ---- NB: Behavior has remained unchanged in all instances of the code where pop_current_activity() has been replaced by pop_current_activity(ACTIVITY_REFRESH_NOW). Change-Id: I56b517b8c9dba823a9fed3a3f558d7469dcea9fd --- apps/misc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/misc.c') diff --git a/apps/misc.c b/apps/misc.c index 950662d19a..7da3c57c73 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -1579,13 +1579,14 @@ void push_current_activity(enum current_activity screen) } } -void pop_current_activity(void) +void pop_current_activity(enum activity_refresh refresh) { current_activity_top--; FOR_NB_SCREENS(i) { skinlist_set_cfg(i, NULL); - skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); + if (ACTIVITY_REFRESH_NOW == refresh) + skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); } } enum current_activity get_current_activity(void) -- cgit v1.2.3