mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-19 02:55:15 +00:00
feat: set default sync period to 30 days for new accounts
This commit is contained in:
parent
b47b3e8be6
commit
c3aa69b8ab
@ -81,6 +81,10 @@ proc delete*(self: Controller) =
|
|||||||
discard
|
discard
|
||||||
|
|
||||||
proc init*(self: Controller) =
|
proc init*(self: Controller) =
|
||||||
|
if self.accountsService.isFirstTimeAccountLogin():
|
||||||
|
let d9 = 9*86400 # 9 days
|
||||||
|
discard self.settingsService.setDefaultSyncPeriod(d9)
|
||||||
|
|
||||||
self.events.on("mailserverAvailable") do(e:Args):
|
self.events.on("mailserverAvailable") do(e:Args):
|
||||||
echo "MAILSERVER AVAILABLE: ", repr(e)
|
echo "MAILSERVER AVAILABLE: ", repr(e)
|
||||||
# We need to take some actions here. This is the only pace where "mailserverAvailable" signal should be handled.
|
# We need to take some actions here. This is the only pace where "mailserverAvailable" signal should be handled.
|
||||||
|
@ -435,6 +435,12 @@ QtObject:
|
|||||||
proc autoMessageEnabled*(self: Service): bool =
|
proc autoMessageEnabled*(self: Service): bool =
|
||||||
return self.settings.autoMessageEnabled
|
return self.settings.autoMessageEnabled
|
||||||
|
|
||||||
|
proc setDefaultSyncPeriod*(self: Service, value: int): bool =
|
||||||
|
if(self.saveSetting(KEY_DEFAULT_SYNC_PERIOD,value)):
|
||||||
|
self.settings.defaultSyncPeriod = value
|
||||||
|
return true
|
||||||
|
return false
|
||||||
|
|
||||||
proc getWakuBloomFilterMode*(self: Service): bool =
|
proc getWakuBloomFilterMode*(self: Service): bool =
|
||||||
return self.settings.wakuBloomFilterMode
|
return self.settings.wakuBloomFilterMode
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user