From d3c13ee1e60d61356de39d348cee7bbd6f329c79 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 14 Dec 2020 22:35:34 -0500 Subject: [PATCH] Fix own account/instance not being loaded if the only active scene was non-main --- Tusker/AuxiliarySceneDelegate.swift | 3 +++ Tusker/ComposeSceneDelegate.swift | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Tusker/AuxiliarySceneDelegate.swift b/Tusker/AuxiliarySceneDelegate.swift index a652bed1d8..32ba48df7e 100644 --- a/Tusker/AuxiliarySceneDelegate.swift +++ b/Tusker/AuxiliarySceneDelegate.swift @@ -43,6 +43,9 @@ class AuxiliarySceneDelegate: UIResponder, UIWindowSceneDelegate { let controller = MastodonController.getForAccount(account) session.mastodonController = controller + controller.getOwnAccount() + controller.getOwnInstance() + guard let rootVC = viewController(for: activity, mastodonController: controller) else { UIApplication.shared.requestSceneSessionDestruction(session, options: nil, errorHandler: nil) return diff --git a/Tusker/ComposeSceneDelegate.swift b/Tusker/ComposeSceneDelegate.swift index 934fb64920..f85eb63225 100644 --- a/Tusker/ComposeSceneDelegate.swift +++ b/Tusker/ComposeSceneDelegate.swift @@ -32,6 +32,9 @@ class ComposeSceneDelegate: UIResponder, UIWindowSceneDelegate { let controller = MastodonController.getForAccount(account) session.mastodonController = controller + controller.getOwnAccount() + controller.getOwnInstance() + let composeVC = ComposeHostingController(draft: draft, mastodonController: controller) composeVC.delegate = self let nav = EnhancedNavigationViewController(rootViewController: composeVC)