Simplify alert modals

This commit is contained in:
Webifi 2023-06-05 22:47:35 -05:00
parent 5853b9e451
commit e6082144cb
1 changed files with 2 additions and 3 deletions

View File

@ -8,7 +8,6 @@
import Fa from 'svelte-fa/src/fa.svelte'
import { openModal } from 'svelte-modals'
import PromptConfirm from './PromptConfirm.svelte'
import PromptNotice from './PromptNotice.svelte'
export let setting:ChatSetting
export let chatSettings:ChatSettings
@ -88,7 +87,7 @@
(typeof setting.beforeChange === 'function') && setting.beforeChange(chatId, setting, el.checked || el.value) &&
refreshSettings()
} catch (e) {
openModal(PromptNotice, errorNotice('Unable to change:', e))
errorNotice('Unable to change:', e)
}
switch (setting.type) {
case 'boolean':
@ -107,7 +106,7 @@
}
} catch (e) {
setChatSettingValue(chatId, setting, val)
openModal(PromptNotice, errorNotice('Unable to change:', e))
errorNotice('Unable to change:', e)
}
dispatch('change', setting)
}