summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2022-12-30 16:27:55 +0100
committerChristian Soffke <christian.soffke@gmail.com>2023-01-06 12:50:18 -0500
commit5750eb3181de4923a8d3141066f4631df3b7d70c (patch)
tree16ad2dfb1cc9302a7fd39475d228e7aa10ee9a0e /apps
parent8366b8511d485727d2ee0882ebc27115bee2e608 (diff)
downloadrockbox-5750eb3181de4923a8d3141066f4631df3b7d70c.tar.gz
rockbox-5750eb3181de4923a8d3141066f4631df3b7d70c.zip
browse_id3: Only push activity when called from WPS
The Properties plugin and playlist viewer have each started using the existing Track Info screen. In both cases, it may not be necessary to push a new activity. Which eliminates the need to perform an additional skin refresh. I've also noticed at least one theme in the wild that assumes ACTIVITY_ID3SCREEN will only ever display info for the currently playing track (as it did previously) and adjusts the skin specifically for that purpose. Change-Id: Ic436d0d4e075a865225839a524387ff2b9058428
Diffstat (limited to 'apps')
-rw-r--r--apps/screens.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/screens.c b/apps/screens.c
index db24e534c1..4fd6c2c2e2 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -699,7 +699,10 @@ bool browse_id3(struct mp3entry *id3, int playlist_display_index, int playlist_a
699 info.playlist_display_index = playlist_display_index; 699 info.playlist_display_index = playlist_display_index;
700 info.playlist_amount = playlist_amount; 700 info.playlist_amount = playlist_amount;
701 bool ret = false; 701 bool ret = false;
702 push_current_activity(ACTIVITY_ID3SCREEN); 702 int curr_activity = get_current_activity();
703 if (curr_activity != ACTIVITY_PLUGIN &&
704 curr_activity != ACTIVITY_PLAYLISTVIEWER)
705 push_current_activity(ACTIVITY_ID3SCREEN);
703 for (i = 0; i < ARRAYLEN(id3_headers); i++) 706 for (i = 0; i < ARRAYLEN(id3_headers); i++)
704 { 707 {
705 char temp[8]; 708 char temp[8];
@@ -732,8 +735,9 @@ bool browse_id3(struct mp3entry *id3, int playlist_display_index, int playlist_a
732 } 735 }
733 } 736 }
734 } 737 }
735 738 if (curr_activity != ACTIVITY_PLUGIN &&
736 pop_current_activity(); 739 curr_activity != ACTIVITY_PLAYLISTVIEWER)
740 pop_current_activity();
737 return ret; 741 return ret;
738} 742}
739 743