Fix file picker not respecting hidden files settings

This will only respect the setting inside the file app. For other apps
we will either need to do an API call or add an input field with the
same idea to spare a blocking api call.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
Carl Schwan 2022-01-11 15:06:54 +01:00
parent 89d109a4d9
commit 1fa58be1aa
No known key found for this signature in database
GPG Key ID: 06B35D38387B67BE
5 changed files with 16 additions and 6 deletions

View File

@ -1143,6 +1143,16 @@ const Dialogs = {
})
}
// Check if the showHidden input field exist and if it exist follow it
// Otherwise just show the hidden files
const showHiddenInput = document.getElementById('showHiddenFiles')
const showHidden = showHiddenInput === null || showHiddenInput.value === "1"
if (!showHidden) {
files = files.filter(function(file) {
return !file.name.startsWith('.')
})
}
var Comparators = {
name: function(fileInfo1, fileInfo2) {
if (fileInfo1.type === 'dir' && fileInfo2.type !== 'dir') {

4
dist/core-login.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/core-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long