diff --git a/src/systems/generation/apiClient.js b/src/systems/generation/apiClient.js index e30bec0..1f72fa3 100644 --- a/src/systems/generation/apiClient.js +++ b/src/systems/generation/apiClient.js @@ -97,11 +97,16 @@ export async function updateRPGData(renderUserStats, renderInfoBox, renderThough try { setIsGenerating(true); - // Update button to show "Updating..." state + // Update desktop button to show "Updating..." state const $updateBtn = $('#rpg-manual-update'); const originalHtml = $updateBtn.html(); $updateBtn.html(' Updating...').prop('disabled', true); + // Update mobile FAB to show spinner (icon only) + const $updateBtnMobile = $('#rpg-manual-update-mobile'); + const originalHtmlMobile = $updateBtnMobile.html(); + $updateBtnMobile.html('').prop('disabled', true); + // Save current preset name before switching (if we're going to switch) if (extensionSettings.useSeparatePreset) { originalPresetName = await getCurrentPresetName(); @@ -219,10 +224,14 @@ export async function updateRPGData(renderUserStats, renderInfoBox, renderThough setIsGenerating(false); - // Restore button to original state + // Restore desktop button to original state const $updateBtn = $('#rpg-manual-update'); $updateBtn.html(' Refresh RPG Info').prop('disabled', false); + // Restore mobile FAB to original state (icon only) + const $updateBtnMobile = $('#rpg-manual-update-mobile'); + $updateBtnMobile.html('').prop('disabled', false); + // Reset the flag after tracker generation completes // This ensures the flag persists through both main generation AND tracker generation // console.log('[RPG Companion] 🔄 Tracker generation complete - resetting lastActionWasSwipe to false');