Skip to content

Commit

Permalink
Ensure UI is evoked on first run
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid committed Nov 2, 2024
1 parent 1ad2bbc commit a0e2a04
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ document.getElementById('useOPFSCheck').addEventListener('change', function (e)
if (e.target.checked) {
return cache.requestPersistentStorage();
} else {
return Promise.resolve(true);
return Promise.resolve(false);
}
};
if (e.target.checked && /Electron/i.test(params.appType)) {
Expand All @@ -1547,6 +1547,7 @@ document.getElementById('useOPFSCheck').addEventListener('change', function (e)
} else {
e.target.checked = false;
params.useOPFS = false;
settingsStore.setItem('useOPFS', false, Infinity);
setOPFSUI();
}
});
Expand All @@ -1566,6 +1567,7 @@ function loadOPFSDirectory () {
});
} else {
params.useOPFS = false;
settingsStore.setItem('useOPFS', false, Infinity);
setOPFSUI();
return uiUtil.systemAlert('<p>Your browser does not support the Origin Private File System!</p><p>Please try picking a folder instead.</p>');
}
Expand Down Expand Up @@ -3375,7 +3377,7 @@ if (storages !== null && storages.length > 0 ||
}
} else {
// If DeviceStorage is not available, we display the file select components
displayFileSelect();
document.getElementById('btnRescanDeviceStorage').click();
if (document.getElementById('archiveFilesLegacy').files && document.getElementById('archiveFilesLegacy').files.length > 0) {
// Archive files are already selected,
setLocalArchiveFromFileSelect();
Expand Down

0 comments on commit a0e2a04

Please sign in to comment.