diff --git a/frontend/src/components/prompts/Delete.vue b/frontend/src/components/prompts/Delete.vue index 39fc2511..89fb5096 100644 --- a/frontend/src/components/prompts/Delete.vue +++ b/frontend/src/components/prompts/Delete.vue @@ -57,7 +57,6 @@ export default { submit: async function () { buttons.loading("delete"); - window.sessionStorage.setItem("modified", "true"); try { if (!this.isListing) { await api.remove(this.$route.path); diff --git a/frontend/src/components/prompts/Rename.vue b/frontend/src/components/prompts/Rename.vue index 457da7a8..d1730701 100644 --- a/frontend/src/components/prompts/Rename.vue +++ b/frontend/src/components/prompts/Rename.vue @@ -97,7 +97,6 @@ export default { newLink = url.removeLastDir(oldLink) + "/" + encodeURIComponent(this.name); - window.sessionStorage.setItem("modified", "true"); try { await api.move([{ from: oldLink, to: newLink }]); if (!this.isListing) { diff --git a/frontend/src/views/Files.vue b/frontend/src/views/Files.vue index 370dac53..8c60dbb2 100644 --- a/frontend/src/views/Files.vue +++ b/frontend/src/views/Files.vue @@ -102,15 +102,7 @@ onUnmounted(() => { fetchDataController.abort(); }); -watch(route, (to, from) => { - if (from.path.endsWith("/")) { - window.sessionStorage.setItem( - "listFrozen", - (!to.path.endsWith("/")).toString() - ); - } else if (to.path.endsWith("/")) { - fileStore.updateRequest(null); - } +watch(route, () => { fetchData(); }); watch(reload, (newValue) => { @@ -130,12 +122,7 @@ const fetchData = async () => { layoutStore.closeHovers(); // Set loading to true and reset the error. - if ( - window.sessionStorage.getItem("listFrozen") !== "true" && - window.sessionStorage.getItem("modified") !== "true" - ) { - layoutStore.loading = true; - } + layoutStore.loading = true; error.value = null; let url = route.path; diff --git a/frontend/src/views/files/FileListing.vue b/frontend/src/views/files/FileListing.vue index 93853408..40558281 100644 --- a/frontend/src/views/files/FileListing.vue +++ b/frontend/src/views/files/FileListing.vue @@ -420,25 +420,16 @@ const isMobile = computed(() => { watch(req, () => { // Reset the show value - if ( - window.sessionStorage.getItem("listFrozen") !== "true" && - window.sessionStorage.getItem("modified") !== "true" - ) { - showLimit.value = 50; + showLimit.value = 50; - nextTick(() => { - // Ensures that the listing is displayed - // How much every listing item affects the window height - setItemWeight(); + nextTick(() => { + // Ensures that the listing is displayed + // How much every listing item affects the window height + setItemWeight(); - // Fill and fit the window with listing items - fillWindow(true); - }); - } - if (req.value?.isDir) { - window.sessionStorage.setItem("listFrozen", "false"); - window.sessionStorage.setItem("modified", "false"); - } + // Fill and fit the window with listing items + fillWindow(true); + }); }); onMounted(() => {