fix(feed): unblock UI during fetch-more and drop indicator label text
loadMoreEpisodesForFeed's hot-cache path ran fully synchronously (no await between getFeed and setFeeds), so the isLoadingMore spinner never painted and keyboard input froze through every feed in a loadMoreAllFeeds batch. Add await yieldToUI() before the setFeeds so the renderer gets a macrotask turn to paint and process input between feeds. Drop the "Loading…/Refreshing…/Downloading N" label text from the global activity indicator — render the braille spinner only, per request.
This commit is contained in:
@@ -25,28 +25,10 @@ export function GlobalActivityIndicator() {
|
||||
downloadStore.getActiveCount() + downloadStore.getQueue().length > 0 ||
|
||||
activity.isActive();
|
||||
|
||||
/** Label priority: downloads in flight > latest tracked activity >
|
||||
* generic loading (only reachable when an isLoading/isSearching flag is
|
||||
* on but nothing else is). */
|
||||
const label = () => {
|
||||
const activeCount = downloadStore.getActiveCount();
|
||||
const queueLength = downloadStore.getQueue().length;
|
||||
if (activeCount + queueLength > 0) {
|
||||
return `Downloading ${activeCount}${
|
||||
queueLength > 0 ? ` +${queueLength} queued` : ""
|
||||
}`;
|
||||
}
|
||||
if (activity.isActive()) {
|
||||
const latest = activity.labels().at(-1);
|
||||
return `${latest ?? "Loading"}…`;
|
||||
}
|
||||
return "Loading…";
|
||||
};
|
||||
|
||||
return (
|
||||
<Show when={isActive()}>
|
||||
<box position="absolute" top={0} right={0} paddingRight={1}>
|
||||
<LoadingIndicator label={label()} />
|
||||
<LoadingIndicator />
|
||||
</box>
|
||||
</Show>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user