feat(@desktop/keycard): user profile prop `address` renamed to `keyUid`
Prop `address` renamed to `keyUid` to be consistent in code and name the things in the way what they really are.
This commit is contained in:
parent
f5cfdd3246
commit
7a998b0e21
|
@ -6,7 +6,7 @@ QtObject:
|
||||||
type UserProfile* = ref object of QObject
|
type UserProfile* = ref object of QObject
|
||||||
# fields which cannot change
|
# fields which cannot change
|
||||||
username: string
|
username: string
|
||||||
address: string
|
keyUid: string
|
||||||
pubKey: string
|
pubKey: string
|
||||||
# fields which may change during runtime
|
# fields which may change during runtime
|
||||||
ensName: string
|
ensName: string
|
||||||
|
@ -27,16 +27,16 @@ QtObject:
|
||||||
new(result, delete)
|
new(result, delete)
|
||||||
result.setup
|
result.setup
|
||||||
|
|
||||||
proc setFixedData*(self: UserProfile, username: string, address: string, pubKey: string) =
|
proc setFixedData*(self: UserProfile, username: string, keyUid: string, pubKey: string) =
|
||||||
self.username = username
|
self.username = username
|
||||||
self.address = address
|
self.keyUid = keyUid
|
||||||
self.pubKey = pubKey
|
self.pubKey = pubKey
|
||||||
|
|
||||||
proc getAddress*(self: UserProfile): string {.slot.} =
|
proc getKeyUid*(self: UserProfile): string {.slot.} =
|
||||||
self.address
|
self.keyUid
|
||||||
|
|
||||||
QtProperty[string] address:
|
QtProperty[string] keyUid:
|
||||||
read = getAddress
|
read = getKeyUid
|
||||||
|
|
||||||
|
|
||||||
proc getPubKey*(self: UserProfile): string {.slot.} =
|
proc getPubKey*(self: UserProfile): string {.slot.} =
|
||||||
|
|
|
@ -67,13 +67,13 @@ method viewDidLoad*(self: Module) =
|
||||||
self.delegate.profileModuleDidLoad()
|
self.delegate.profileModuleDidLoad()
|
||||||
|
|
||||||
method storeIdentityImage*(self: Module, imageUrl: string, aX: int, aY: int, bX: int, bY: int) =
|
method storeIdentityImage*(self: Module, imageUrl: string, aX: int, aY: int, bX: int, bY: int) =
|
||||||
let address = singletonInstance.userProfile.getAddress()
|
let keyUid = singletonInstance.userProfile.getKeyUid()
|
||||||
let image = singletonInstance.utils.formatImagePath(imageUrl)
|
let image = singletonInstance.utils.formatImagePath(imageUrl)
|
||||||
self.controller.storeIdentityImage(address, image, aX, aY, bX, bY)
|
self.controller.storeIdentityImage(keyUid, image, aX, aY, bX, bY)
|
||||||
|
|
||||||
method deleteIdentityImage*(self: Module) =
|
method deleteIdentityImage*(self: Module) =
|
||||||
let address = singletonInstance.userProfile.getAddress()
|
let keyUid = singletonInstance.userProfile.getKeyUid()
|
||||||
self.controller.deleteIdentityImage(address)
|
self.controller.deleteIdentityImage(keyUid)
|
||||||
|
|
||||||
method setDisplayName*(self: Module, displayName: string) =
|
method setDisplayName*(self: Module, displayName: string) =
|
||||||
self.controller.setDisplayName(displayName)
|
self.controller.setDisplayName(displayName)
|
||||||
|
|
Loading…
Reference in New Issue