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/menus/playlist_menu.c | 2 ++ apps/menus/time_menu.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/menus') diff --git a/apps/menus/playlist_menu.c b/apps/menus/playlist_menu.c index 89c93edc2e..981ec74798 100644 --- a/apps/menus/playlist_menu.c +++ b/apps/menus/playlist_menu.c @@ -138,6 +138,8 @@ int save_playlist_screen(struct playlist_info* playlist) static int playlist_view_(void) { playlist_viewer_ex(NULL, NULL); + FOR_NB_SCREENS(i) /* Playlist Viewer defers skin updates when popping its activity */ + skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); return 0; } MENUITEM_FUNCTION(create_playlist_item, 0, ID2P(LANG_CREATE_PLAYLIST), diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c index e37e2b5637..b44d47ff8b 100644 --- a/apps/menus/time_menu.c +++ b/apps/menus/time_menu.c @@ -304,7 +304,7 @@ int time_screen(void* ignored) #endif ret = do_menu(&time_menu, NULL, menu, false); - pop_current_activity(); + pop_current_activity(ACTIVITY_REFRESH_NOW); /* see comments above in the button callback */ if (!menu_was_pressed && ret == GO_TO_PREVIOUS) return 0; -- cgit v1.2.3