From c187e5eaf7eeaa207e9e16a2f69a15da70ad1793 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 28 Aug 2023 11:25:17 +0200 Subject: [PATCH] fix(FilePicker): Reset selected files if the current directory is changed Signed-off-by: Ferdinand Thiessen --- l10n/messages.pot | 8 ++++---- lib/components/FilePicker/FilePicker.vue | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/l10n/messages.pot b/l10n/messages.pot index b422ddf40..bb2b4d8ec 100644 --- a/l10n/messages.pot +++ b/l10n/messages.pot @@ -38,7 +38,7 @@ msgstr "" msgid "Copy to {target}" msgstr "" -#: lib/components/FilePicker/FilePicker.vue:249 +#: lib/components/FilePicker/FilePicker.vue:251 msgid "Could not create the new folder" msgstr "" @@ -51,11 +51,11 @@ msgstr "" msgid "File name cannot be empty." msgstr "" -#: lib/components/FilePicker/FilePicker.vue:235 +#: lib/components/FilePicker/FilePicker.vue:237 msgid "Files and folders you mark as favorite will show up here." msgstr "" -#: lib/components/FilePicker/FilePicker.vue:233 +#: lib/components/FilePicker/FilePicker.vue:235 msgid "Files and folders you recently modified will show up here." msgstr "" @@ -106,6 +106,6 @@ msgstr "" msgid "Unset" msgstr "" -#: lib/components/FilePicker/FilePicker.vue:231 +#: lib/components/FilePicker/FilePicker.vue:233 msgid "Upload some content or sync with your devices!" msgstr "" diff --git a/lib/components/FilePicker/FilePicker.vue b/lib/components/FilePicker/FilePicker.vue index 06696b93a..dfaf3c8d7 100644 --- a/lib/components/FilePicker/FilePicker.vue +++ b/lib/components/FilePicker/FilePicker.vue @@ -190,6 +190,8 @@ const currentPath = computed({ window.sessionStorage.setItem('NC.FilePicker.LastPath', path) } navigatedPath.value = path + // Reset selected files + selectedFiles.value = [] }, })