Don't reload content all the time (IOS-192)

This commit is contained in:
Nathan Mattes 2024-02-20 15:26:05 +01:00
parent 897fc0d348
commit 86e968fabd
2 changed files with 5 additions and 13 deletions

View File

@ -56,12 +56,6 @@ extension ProfileHeaderView {
self.account = account
self.me = me
self.relationship = relationship
#warning("TODO: Implement")
// $relationshipActionOptionSet
// .compactMap { $0.highPriorityAction(except: []) }
// .map { $0 == .none }
// .assign(to: &$isRelationshipActionButtonHidden)
}
}
}

View File

@ -84,13 +84,11 @@ class ProfileViewModel: NSObject {
self.profileAboutViewModel = ProfileAboutViewModel(context: context, account: account)
super.init()
// bind user
$account
.map { user -> UserIdentifier? in
guard let domain = account.domain else { return nil }
return MastodonUserIdentifier(domain: domain, userID: account.id)
}
.assign(to: &$userIdentifier)
if let domain = account.domain {
userIdentifier = MastodonUserIdentifier(domain: domain, userID: account.id)
} else {
userIdentifier = nil
}
// bind userIdentifier
$userIdentifier.assign(to: &postsUserTimelineViewModel.$userIdentifier)