Skip to content

Commit

Permalink
[FIX] FFOS UI and race around
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishabhg71 committed Oct 30, 2023
1 parent 8049409 commit 16ec687
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ <h2 data-i18n="configure-title">Configuration</h2>
<p><span data-i18n="configure-selectordisplay">Drag and drop a new ZIM file, or</span>
<a href="#" id="selectorsDisplayLink" data-i18n="configure-selectordisplay-link">display file selectors</a>.</p>
</div>
<div id="openLocalFiles" style="display: none; display: flex;flex-direction: row;">
<div id="openLocalFiles" style="display: none;">
<p data-i18n="configure-select-instructions" id="selectInstructions">Please select or drag and drop a .zim file (or all the .zimaa, .zimab etc in
case of a split ZIM file):</p>
<span id="fileSelectionButtonContainer">
Expand Down
3 changes: 3 additions & 0 deletions www/js/lib/abstractFilesystemAccess.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ StorageFirefoxOS.prototype.enumerate = function (path) {
* @returns {Promise<Array<string>>} Array of unique filenames (if a split zim is considered a single file)
*/
async function updateZimDropdownOptions (files, selectedFile) {
const isFireFoxOsNativeFileApiAvailable = typeof navigator.getDeviceStorages === 'function';
if (isFireFoxOsNativeFileApiAvailable) return // do nothing let other function handle it

const select = document.getElementById('archiveList');
const options = [];
let count = 0;
Expand Down

0 comments on commit 16ec687

Please sign in to comment.