Skip to content
Snippets Groups Projects
Commit e7bb5dd7 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk
Browse files

ui/ux: fix username appearance


This patch displays ringID if username is empty string

Change-Id: Ib1c7f261e5242f55783f3d462e75eef73e89e7ec
Reviewed-by: default avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 5e912612
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,7 @@ class ContactRequestsViewModel: ViewModel {
return lookupNameResponse.address == item.contactRequest.ringId
})
.subscribe(onNext: { lookupNameResponse in
if lookupNameResponse.state == .found {
if lookupNameResponse.state == .found && !lookupNameResponse.name.isEmpty {
item.userName.value = lookupNameResponse.name
} else {
item.userName.value = lookupNameResponse.address
......
......@@ -103,7 +103,7 @@ class ConversationViewModel: ViewModel {
return lookupNameResponse.address != nil &&
lookupNameResponse.address == recipientRingId
}).subscribe(onNext: { [unowned self] lookupNameResponse in
if let name = lookupNameResponse.name {
if let name = lookupNameResponse.name, !name.isEmpty {
self.userName.onNext(name)
contact?.userName = name
} else if let address = lookupNameResponse.address {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment