Refactoring

This commit is contained in:
Justin Mazzocchi 2020-09-09 00:28:14 -07:00
parent 44f6e5d551
commit e75791f670
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C
2 changed files with 8 additions and 5 deletions

View file

@ -54,8 +54,7 @@ public extension RootViewModel {
identification.observationErrors
.receive(on: RunLoop.main)
.map { [weak self] _ in self?.mostRecentlyUsedIdentityID }
.sink { [weak self] in self?.newIdentitySelected(id: $0) }
.sink { [weak self] _ in self?.newIdentitySelected(id: self?.mostRecentlyUsedIdentityID ) }
.store(in: &cancellables)
identification.service.updateLastUse()

View file

@ -77,13 +77,17 @@ private extension IdentitiesView {
.font(.subheadline)
.foregroundColor(.secondary)
} else {
Text(identity.handle)
.font(.headline)
.foregroundColor(.secondary)
if let instance = identity.instance {
CustomEmojiText(
text: instance.title,
emoji: [],
textStyle: .headline)
Text(instance.uri)
.font(.subheadline)
.foregroundColor(.secondary)
} else {
Text(identity.handle)
.font(.headline)
}
}
Spacer()