From 646f19a78c693b64977dca377f9841130c1236df Mon Sep 17 00:00:00 2001 From: alexsparkes Date: Sun, 1 Feb 2026 20:54:29 +0000 Subject: [PATCH] feat(install): improve photo pack installation logic to prevent immediate background refresh --- src/utils/marketplace/install.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils/marketplace/install.js b/src/utils/marketplace/install.js index d4dead7c..03c94a80 100644 --- a/src/utils/marketplace/install.js +++ b/src/utils/marketplace/install.js @@ -29,6 +29,7 @@ export function install(type, input, sideload, collection) { case 'photos': { const currentPhotos = JSON.parse(localStorage.getItem('photo_packs')) || []; + const hadPhotoPacks = currentPhotos.length > 0; input.photos.forEach((photo) => { currentPhotos.push(photo); }); @@ -41,8 +42,11 @@ export function install(type, input, sideload, collection) { localStorage.removeItem('backgroundchange'); // Clear image queue to ensure fresh background loads clearQueuesOnSettingChange('packInstall'); - // Set refresh event to emit after installed data is saved - refreshEvent = 'backgroundrefresh'; + // Only refresh background if this is the first photo pack being installed + // Otherwise just update the queue without jarring the user with an immediate refresh + if (!hadPhotoPacks) { + refreshEvent = 'backgroundrefresh'; + } break; }