Merge branch 'main' into fix/user-parsing-issues

This commit is contained in:
Paperboy
2025-10-22 09:59:27 +11:00
committed by GitHub
6 changed files with 187 additions and 245 deletions
+2 -24
View File
@@ -328,34 +328,12 @@ async function initUI() {
toggleAnimations();
});
// Bind to both desktop and mobile refresh buttons
$('#rpg-manual-update, #rpg-manual-update-mobile').on('click', async function() {
// Get mobile button reference
const $mobileBtn = $('#rpg-manual-update-mobile');
// Skip if we just finished dragging the mobile button
if ($mobileBtn.data('just-dragged')) {
console.log('[RPG Companion] Click blocked - just finished dragging refresh button');
return;
}
$('#rpg-manual-update').on('click', async function() {
if (!extensionSettings.enabled) {
// console.log('[RPG Companion] Extension is disabled. Please enable it in the Extensions tab.');
return;
}
// Remove focus to prevent sticky black state on mobile
$(this).blur();
// Add spinning animation to mobile button
$mobileBtn.addClass('spinning');
try {
await updateRPGData(renderUserStats, renderInfoBox, renderThoughts, renderInventory);
} finally {
// Remove spinning animation when done
$mobileBtn.removeClass('spinning');
}
await updateRPGData(renderUserStats, renderInfoBox, renderThoughts, renderInventory);
});
// Reset FAB positions button