mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-11 13:18:21 -04:00
This commit is contained in:
parent
e797f17eda
commit
832bfcd043
@ -1119,7 +1119,7 @@ function getNativeFSHandle (callback) {
|
|||||||
if (callback) {
|
if (callback) {
|
||||||
callback(handle);
|
callback(handle);
|
||||||
} else {
|
} else {
|
||||||
searchForArchivesInPreferencesOrStorage(true);
|
searchForArchivesInPreferencesOrStorage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -3235,6 +3235,8 @@ if (storages !== null && storages.length > 0 ||
|
|||||||
if (params.useOPFS) {
|
if (params.useOPFS) {
|
||||||
if (!params.storedFile) btnConfigure.click();
|
if (!params.storedFile) btnConfigure.click();
|
||||||
loadOPFSDirectory();
|
loadOPFSDirectory();
|
||||||
|
} else if (params.storedFile && navigator && navigator.storage && 'getDirectory' in navigator.storage) {
|
||||||
|
getNativeFSHandle();
|
||||||
} else {
|
} else {
|
||||||
// We are in an app that cannot open files auotomatically, so populate archive list and show file pickers
|
// We are in an app that cannot open files auotomatically, so populate archive list and show file pickers
|
||||||
btnConfigure.click();
|
btnConfigure.click();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user