fix(settings): keep full refresh busy across phases
Centralize persisted full-refresh phase detection so the Settings rebuild button stays in its refreshing state during Laya, projection, writing, and EPG phases. Refs #44 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -8,6 +8,14 @@
|
||||
const INDETERMINATE_PHASES = new Set([
|
||||
'writing', 'refreshing_live_sources', 'refreshing_epg_sources', 'writing_epg_matches'
|
||||
]);
|
||||
const FULL_REFRESH_PHASES = new Set([
|
||||
'refreshing_live_sources', 'laya_identity', 'laya_language', 'projecting', 'writing',
|
||||
'refreshing_epg_sources', 'matching_epg', 'laya_epg_matching', 'writing_epg_matches'
|
||||
]);
|
||||
|
||||
function isFullRefreshPhase(phase) {
|
||||
return FULL_REFRESH_PHASES.has(String(phase || '').toLowerCase());
|
||||
}
|
||||
|
||||
function progressValues(status, phase) {
|
||||
if (phase === 'laya_identity') {
|
||||
@ -93,5 +101,5 @@
|
||||
: '';
|
||||
}
|
||||
|
||||
return { layaFallbackMessage, present };
|
||||
return { isFullRefreshPhase, layaFallbackMessage, present };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user