fix: directly populate user settings with default reminder amount
This commit is contained in:
parent
2aee048f61
commit
5c68643892
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ import AbstractModel from './abstractModel'
|
||||||
|
|
||||||
import type {IUserSettings} from '@/modelTypes/IUserSettings'
|
import type {IUserSettings} from '@/modelTypes/IUserSettings'
|
||||||
import {getCurrentLanguage} from '@/i18n'
|
import {getCurrentLanguage} from '@/i18n'
|
||||||
|
import {getDefaultReminderAmount} from '@/helpers/defaultReminder'
|
||||||
|
|
||||||
export default class UserSettingsModel extends AbstractModel<IUserSettings> implements IUserSettings {
|
export default class UserSettingsModel extends AbstractModel<IUserSettings> implements IUserSettings {
|
||||||
name = ''
|
name = ''
|
||||||
|
@ -14,7 +15,7 @@ export default class UserSettingsModel extends AbstractModel<IUserSettings> impl
|
||||||
timezone = ''
|
timezone = ''
|
||||||
language = getCurrentLanguage()
|
language = getCurrentLanguage()
|
||||||
defaultReminder = false
|
defaultReminder = false
|
||||||
defaultReminderAmount = 0
|
defaultReminderAmount = getDefaultReminderAmount() || 0
|
||||||
|
|
||||||
constructor(data: Partial<IUserSettings> = {}) {
|
constructor(data: Partial<IUserSettings> = {}) {
|
||||||
super()
|
super()
|
||||||
|
|
Loading…
Reference in a new issue