mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 09:41:00 +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
|
identification.observationErrors
|
||||||
.receive(on: RunLoop.main)
|
.receive(on: RunLoop.main)
|
||||||
.map { [weak self] _ in self?.mostRecentlyUsedIdentityID }
|
.sink { [weak self] _ in self?.newIdentitySelected(id: self?.mostRecentlyUsedIdentityID ) }
|
||||||
.sink { [weak self] in self?.newIdentitySelected(id: $0) }
|
|
||||||
.store(in: &cancellables)
|
.store(in: &cancellables)
|
||||||
|
|
||||||
identification.service.updateLastUse()
|
identification.service.updateLastUse()
|
||||||
|
|
|
@ -77,13 +77,17 @@ private extension IdentitiesView {
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
} else {
|
} else {
|
||||||
Text(identity.handle)
|
|
||||||
.font(.headline)
|
|
||||||
.foregroundColor(.secondary)
|
|
||||||
if let instance = identity.instance {
|
if let instance = identity.instance {
|
||||||
|
CustomEmojiText(
|
||||||
|
text: instance.title,
|
||||||
|
emoji: [],
|
||||||
|
textStyle: .headline)
|
||||||
Text(instance.uri)
|
Text(instance.uri)
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
|
} else {
|
||||||
|
Text(identity.handle)
|
||||||
|
.font(.headline)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
Loading…
Reference in a new issue