Fix own account/instance not being loaded if the only active scene was non-main

This commit is contained in:
Shadowfacts 2020-12-14 22:35:34 -05:00
parent 1b44117891
commit d3c13ee1e6
2 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,9 @@ class AuxiliarySceneDelegate: UIResponder, UIWindowSceneDelegate {
let controller = MastodonController.getForAccount(account) let controller = MastodonController.getForAccount(account)
session.mastodonController = controller session.mastodonController = controller
controller.getOwnAccount()
controller.getOwnInstance()
guard let rootVC = viewController(for: activity, mastodonController: controller) else { guard let rootVC = viewController(for: activity, mastodonController: controller) else {
UIApplication.shared.requestSceneSessionDestruction(session, options: nil, errorHandler: nil) UIApplication.shared.requestSceneSessionDestruction(session, options: nil, errorHandler: nil)
return return

View File

@ -32,6 +32,9 @@ class ComposeSceneDelegate: UIResponder, UIWindowSceneDelegate {
let controller = MastodonController.getForAccount(account) let controller = MastodonController.getForAccount(account)
session.mastodonController = controller session.mastodonController = controller
controller.getOwnAccount()
controller.getOwnInstance()
let composeVC = ComposeHostingController(draft: draft, mastodonController: controller) let composeVC = ComposeHostingController(draft: draft, mastodonController: controller)
composeVC.delegate = self composeVC.delegate = self
let nav = EnhancedNavigationViewController(rootViewController: composeVC) let nav = EnhancedNavigationViewController(rootViewController: composeVC)