Use an existing account for the me-Screen (IOS-255)

Technically this is a workaround: Replacing the ProfileViewModel! with a real optional affects the entire Profile-screen including the header etc. as this ProfileViewModel is used everywhere
This commit is contained in:
Nathan Mattes 2024-06-09 14:03:50 +02:00
parent ef8ceb56c9
commit 46e4584f05
1 changed files with 4 additions and 0 deletions

View File

@ -85,6 +85,10 @@ class MainTabBarController: UITabBarController {
notificationViewController.viewModel = NotificationViewModel(context: context, authContext: authContext)
homeTimelineViewController.viewModel = HomeTimelineViewModel(context: context, authContext: authContext)
searchViewController.viewModel = SearchViewModel(context: context, authContext: authContext)
if let account = authContext.mastodonAuthenticationBox.authentication.account() {
meProfileViewController.viewModel = ProfileViewModel(context: context, authContext: authContext, account: account, relationship: nil, me: account)
}
}
super.init(nibName: nil, bundle: nil)