diff options
Diffstat (limited to 'src/components/SettingsModal.vue')
| -rw-r--r-- | src/components/SettingsModal.vue | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/SettingsModal.vue b/src/components/SettingsModal.vue index 3e56373..04b5e76 100644 --- a/src/components/SettingsModal.vue +++ b/src/components/SettingsModal.vue @@ -110,9 +110,14 @@ const lastCtg = computed(() => { // When all but one category is disabled, names return null; } }); +let changedCtg: string | null = null; // Used to defer signalling of a category change until modal closes function onSettingChg(option: string){ store.save(option); - emit('change', option); + if (option.startsWith('ctgs.')){ + changedCtg = option; + } else { + emit('change', option); + } // Make 'Saved' indicator appear/animate if (!saved.value){ saved.value = true; @@ -137,6 +142,9 @@ function onReset(){ function onClose(evt: Event){ if (evt.target == rootRef.value || closeRef.value!.$el.contains(evt.target)){ emit('close'); + if (changedCtg != null){ + emit('change', changedCtg); + } } } |
