From fcc133e9d1a63a7741fc07f2d4cc528e4e713269 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 27 Apr 2021 10:58:03 -0400 Subject: [PATCH] fix(Settings): fix QT settings not being saved on first start Fixes #2312 This will reset the QT settings of all users, since we change from using the address to using the pubkey. The reason for that is that the account address also called keyId is somehow not set correctly on first login. The pubkey stays constant on the other hand. So using the pubkey is better. --- src/app/profile/view.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/profile/view.nim b/src/app/profile/view.nim index 6283b5ff21..71fc7ca5c4 100644 --- a/src/app/profile/view.nim +++ b/src/app/profile/view.nim @@ -74,13 +74,13 @@ QtObject: proc profileSettingsFileChanged*(self: ProfileView) {.signal.} proc getProfileSettingsFile(self: ProfileView): string {.slot.} = - let address = - if (self.profile.address == ""): + let pubkey = + if (self.profile.pubKey == ""): UNKNOWN_ACCOUNT else: - self.profile.address + self.profile.pubKey - return os.joinPath(accountConstants.DATADIR, "qt", address) + return os.joinPath(accountConstants.DATADIR, "qt", pubkey) QtProperty[string] profileSettingsFile: read = getProfileSettingsFile