Fix(ProfileShowcase): send contact update when bio changes
fixes #12617
This commit is contained in:
parent
b771ac6aed
commit
cd7de2a2e5
|
@ -91,7 +91,7 @@ proc getBio*(self: Controller): string =
|
|||
self.settingsService.getBio()
|
||||
|
||||
proc setBio*(self: Controller, bio: string): bool =
|
||||
self.settingsService.saveBio(bio)
|
||||
self.profileService.setBio(bio)
|
||||
|
||||
proc saveProfileShowcasePreferences*(self: Controller, preferences: ProfileShowcasePreferencesDto, revealedAddresses: seq[string]) =
|
||||
self.profileService.saveProfileShowcasePreferences(preferences)
|
||||
|
|
|
@ -88,17 +88,31 @@ QtObject:
|
|||
proc setDisplayName*(self: Service, displayName: string): bool =
|
||||
try:
|
||||
let response = status_accounts.setDisplayName(displayName)
|
||||
if(not response.error.isNil):
|
||||
if not response.error.isNil:
|
||||
error "could not set display name"
|
||||
return false
|
||||
if(not self.settingsService.saveDisplayName(displayName)):
|
||||
error "could save display name to the settings"
|
||||
if not self.settingsService.saveDisplayName(displayName):
|
||||
error "could not save display name to the settings"
|
||||
return false
|
||||
return true
|
||||
except Exception as e:
|
||||
error "error: ", procName="setDisplayName", errName = e.name, errDesription = e.msg
|
||||
return false
|
||||
|
||||
proc setBio*(self: Service, bio: string): bool =
|
||||
try:
|
||||
let response = status_accounts.setBio(bio)
|
||||
if not response.error.isNil:
|
||||
error "could not set bio"
|
||||
return false
|
||||
if not self.settingsService.saveBio(bio):
|
||||
error "could not set bio to the settings"
|
||||
return false
|
||||
return true
|
||||
except Exception as e:
|
||||
error "error: ", procName="setBio", errName = e.name, errDesription = e.msg
|
||||
return false
|
||||
|
||||
proc requestProfileShowcasePreferences*(self: Service) =
|
||||
let arg = QObjectTaskArg(
|
||||
tptr: cast[ByteAddress](asyncGetProfileShowcasePreferencesTask),
|
||||
|
|
|
@ -421,6 +421,10 @@ proc setDisplayName*(displayName: string): RpcResponse[JsonNode] =
|
|||
let payload = %* [displayName]
|
||||
result = core.callPrivateRPC("setDisplayName".prefix, payload)
|
||||
|
||||
proc setBio*(bio: string): RpcResponse[JsonNode] =
|
||||
let payload = %* [bio]
|
||||
result = core.callPrivateRPC("setBio".prefix, payload)
|
||||
|
||||
proc getDerivedAddresses*(password: string, derivedFrom: string, paths: seq[string]): RpcResponse[JsonNode] =
|
||||
let payload = %* [password, derivedFrom, paths]
|
||||
result = core.callPrivateRPC("wallet_getDerivedAddresses", payload)
|
||||
|
|
Loading…
Reference in New Issue