mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-03 10:14:04 +00:00
fix: pinned mailserver default value
This commit is contained in:
parent
199d5a0342
commit
4b72e5dde0
@ -71,12 +71,12 @@ proc getFleet*(): Fleet =
|
||||
result = parseEnum[Fleet](fleet)
|
||||
|
||||
proc getPinnedMailserver*(): string =
|
||||
let pinnedMailservers = getSetting[JsonNode](Setting.PinnedMailservers)
|
||||
let pinnedMailservers = getSetting[JsonNode](Setting.PinnedMailservers, %*{})
|
||||
let fleet = getSetting[string](Setting.Fleet, $Fleet.PROD)
|
||||
return pinnedMailservers{fleet}.getStr()
|
||||
|
||||
proc pinMailserver*(enode: string = "") =
|
||||
let pinnedMailservers = getSetting[JsonNode](Setting.PinnedMailservers)
|
||||
let pinnedMailservers = getSetting[JsonNode](Setting.PinnedMailservers, %*{})
|
||||
let fleet = getSetting[string](Setting.Fleet, $Fleet.PROD)
|
||||
pinnedMailservers[fleet] = newJString(enode)
|
||||
discard saveSetting(Setting.PinnedMailservers, pinnedMailservers)
|
||||
|
Loading…
x
Reference in New Issue
Block a user