mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 13:56:10 +00:00
fix: fix MyProfile not having the right data
This commit is contained in:
parent
862dbcba04
commit
145519719b
@ -41,6 +41,7 @@ proc init*(self: ProfileController, account: Account) =
|
|||||||
let appearance = status_settings.getSetting[int](Setting.Appearance)
|
let appearance = status_settings.getSetting[int](Setting.Appearance)
|
||||||
profile.appearance = appearance
|
profile.appearance = appearance
|
||||||
profile.id = pubKey
|
profile.id = pubKey
|
||||||
|
profile.address = account.keyUid
|
||||||
|
|
||||||
self.view.addDevices(devices.getAllDevices())
|
self.view.addDevices(devices.getAllDevices())
|
||||||
self.view.setDeviceSetup(devices.isDeviceSetup())
|
self.view.setDeviceSetup(devices.isDeviceSetup())
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
import NimQml
|
import NimQml
|
||||||
|
import chronicles
|
||||||
import ../../../status/profile/profile
|
import ../../../status/profile/profile
|
||||||
|
|
||||||
QtObject:
|
QtObject:
|
||||||
type ProfileInfoView* = ref object of QObject
|
type ProfileInfoView* = ref object of QObject
|
||||||
username*: string
|
username*: string
|
||||||
identicon*: string
|
identicon*: string
|
||||||
|
address*: string
|
||||||
pubKey*: string
|
pubKey*: string
|
||||||
appearance*: int
|
appearance*: int
|
||||||
|
|
||||||
@ -30,6 +32,7 @@ QtObject:
|
|||||||
self.identicon = profile.identicon
|
self.identicon = profile.identicon
|
||||||
self.appearance = profile.appearance
|
self.appearance = profile.appearance
|
||||||
self.pubKey = profile.id
|
self.pubKey = profile.id
|
||||||
|
self.address = profile.address
|
||||||
self.profileChanged()
|
self.profileChanged()
|
||||||
|
|
||||||
proc username*(self: ProfileInfoView): string {.slot.} = result = self.username
|
proc username*(self: ProfileInfoView): string {.slot.} = result = self.username
|
||||||
@ -53,10 +56,12 @@ QtObject:
|
|||||||
|
|
||||||
proc pubKey*(self: ProfileInfoView): string {.slot.} = self.pubKey
|
proc pubKey*(self: ProfileInfoView): string {.slot.} = self.pubKey
|
||||||
|
|
||||||
proc setPubKey*(self: ProfileInfoView, pubKey: string) {.slot.} =
|
|
||||||
self.pubKey = pubKey
|
|
||||||
self.profileChanged()
|
|
||||||
|
|
||||||
QtProperty[string] pubKey:
|
QtProperty[string] pubKey:
|
||||||
read = pubKey
|
read = pubKey
|
||||||
notify = profileChanged
|
notify = profileChanged
|
||||||
|
|
||||||
|
proc address*(self: ProfileInfoView): string {.slot.} = self.address
|
||||||
|
|
||||||
|
QtProperty[string] address:
|
||||||
|
read = address
|
||||||
|
notify = profileChanged
|
||||||
|
@ -39,7 +39,12 @@ SplitView {
|
|||||||
|
|
||||||
// This list needs to match LeftTab/constants.js
|
// This list needs to match LeftTab/constants.js
|
||||||
// Would be better if we could make them match automatically
|
// Would be better if we could make them match automatically
|
||||||
MyProfileContainer {}
|
MyProfileContainer {
|
||||||
|
username: profileModel.profile.username
|
||||||
|
identicon: profileModel.profile.identicon
|
||||||
|
pubkey: profileModel.profile.pubKey
|
||||||
|
address: profileModel.profile.address
|
||||||
|
}
|
||||||
|
|
||||||
ContactsContainer {}
|
ContactsContainer {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user