From 072228bb70c71bd05eff848d15c36d7f540972b3 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sat, 20 Jul 2024 00:06:31 -0400 Subject: [feature] playlist. show search progressbar when iterating playlist entries Change-Id: Ib38363f7495ca523e7cc401c0d39e060ed1705ad --- apps/misc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'apps/misc.c') diff --git a/apps/misc.c b/apps/misc.c index d8caabd397..bd7aa9485b 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -200,7 +200,7 @@ bool warn_on_pl_erase(void) return true; } -bool show_search_progress(bool init, int count) +bool show_search_progress(bool init, int display_count, int current, int total) { static int last_tick = 0; @@ -214,7 +214,15 @@ bool show_search_progress(bool init, int count) /* Update progress every 1/10 of a second */ if (TIME_AFTER(current_tick, last_tick + HZ/10)) { - splashf(0, str(LANG_PLAYLIST_SEARCH_MSG), count, str(LANG_OFF_ABORT)); + if (total != current) + { + splash_progress(current, total, str(LANG_PLAYLIST_SEARCH_MSG), + display_count, str(LANG_OFF_ABORT)); + } + else + splashf(0, str(LANG_PLAYLIST_SEARCH_MSG), + display_count, str(LANG_OFF_ABORT)); + if (action_userabort(TIMEOUT_NOBLOCK)) return false; last_tick = current_tick; -- cgit v1.2.3