mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 08:10:59 +00:00
Refactoring
This commit is contained in:
parent
44f6e5d551
commit
e75791f670
2 changed files with 8 additions and 5 deletions
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue