Persist show archived state

This commit is contained in:
kolaente 2021-01-30 20:59:42 +01:00
parent 826d90c7eb
commit c49345c31b
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 1 deletions

View File

@ -7,7 +7,7 @@
Create saved filter
</x-button>
<fancycheckbox class="show-archived-check" v-model="showArchived">
<fancycheckbox class="show-archived-check" v-model="showArchived" @change="saveShowArchivedState">
Show Archived
</fancycheckbox>
@ -99,6 +99,7 @@ export default {
}
},
created() {
this.showArchived = localStorage.getItem('showArchived') ?? false
this.loadBackgroundsForLists()
},
mounted() {
@ -136,6 +137,9 @@ export default {
this.$store.dispatch('lists/toggleListFavorite', list)
.catch(e => this.error(e, this))
},
saveShowArchivedState() {
localStorage.setItem('showArchived', this.showArchived)
},
},
}
</script>