fix: directly populate user settings with default reminder amount

This commit is contained in:
kolaente 2022-09-29 18:31:56 +02:00
parent 2aee048f61
commit 5c68643892
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -2,6 +2,7 @@ import AbstractModel from './abstractModel'
import type {IUserSettings} from '@/modelTypes/IUserSettings'
import {getCurrentLanguage} from '@/i18n'
import {getDefaultReminderAmount} from '@/helpers/defaultReminder'
export default class UserSettingsModel extends AbstractModel<IUserSettings> implements IUserSettings {
name = ''
@ -14,7 +15,7 @@ export default class UserSettingsModel extends AbstractModel<IUserSettings> impl
timezone = ''
language = getCurrentLanguage()
defaultReminder = false
defaultReminderAmount = 0
defaultReminderAmount = getDefaultReminderAmount() || 0
constructor(data: Partial<IUserSettings> = {}) {
super()