fix: set preferred username
This commit is contained in:
parent
93aa7e6ae7
commit
8e80497cdc
|
@ -156,6 +156,9 @@ QtObject:
|
||||||
|
|
||||||
proc connect(self: EnsManager, ensUsername: string) =
|
proc connect(self: EnsManager, ensUsername: string) =
|
||||||
var usernames = getSetting[seq[string]](self.status.settings, Setting.Usernames, @[])
|
var usernames = getSetting[seq[string]](self.status.settings, Setting.Usernames, @[])
|
||||||
|
if usernames.len == 0:
|
||||||
|
self.setPreferredUsername(ensUsername)
|
||||||
|
|
||||||
usernames.add ensUsername
|
usernames.add ensUsername
|
||||||
discard self.status.settings.saveSetting(Setting.Usernames, %*usernames)
|
discard self.status.settings.saveSetting(Setting.Usernames, %*usernames)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue