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:
@ -154,12 +154,9 @@ class SettingsPage {
|
||||
const presentation = LiveAnalysisPresentation.present(status);
|
||||
buttons.forEach(button => { button.disabled = presentation.busy; });
|
||||
const rebuildButton = document.getElementById('live-rebuild-catalog-button');
|
||||
const fullRefreshPhases = new Set([
|
||||
'refreshing_live_sources', 'refreshing_epg_sources', 'matching_epg',
|
||||
'laya_epg_matching', 'writing_epg_matches'
|
||||
]);
|
||||
const fullRefreshBusy = presentation.busy &&
|
||||
(this.currentLiveAnalysisAction === 'rebuild' || fullRefreshPhases.has(presentation.phase));
|
||||
(this.currentLiveAnalysisAction === 'rebuild' ||
|
||||
LiveAnalysisPresentation.isFullRefreshPhase(presentation.phase));
|
||||
if (rebuildButton) rebuildButton.textContent = fullRefreshBusy ? 'Refreshing…' : 'Run full refresh';
|
||||
statusElement.textContent = presentation.statusLabel;
|
||||
progress.hidden = !presentation.busy;
|
||||
|
||||
Reference in New Issue
Block a user