From 12791ddf284ade317f0901ce7e6dc16f41dcffea Mon Sep 17 00:00:00 2001 From: Chase Carroll Date: Mon, 5 Dec 2022 10:22:14 -0500 Subject: [PATCH] Use UIWindow subclass in DEBUG builds --- Mastodon/Supporting Files/SceneDelegate.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mastodon/Supporting Files/SceneDelegate.swift b/Mastodon/Supporting Files/SceneDelegate.swift index 15c4069cb..e3256d260 100644 --- a/Mastodon/Supporting Files/SceneDelegate.swift +++ b/Mastodon/Supporting Files/SceneDelegate.swift @@ -11,6 +11,7 @@ import Combine import CoreDataStack import MastodonCore import MastodonExtension +import MastodonUI #if PROFILE import FPSIndicator @@ -35,8 +36,13 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = scene as? UIWindowScene else { return } + #if DEBUG + let window = TouchesVisibleWindow(windowScene: windowScene) + self.window = window + #else let window = UIWindow(windowScene: windowScene) self.window = window + #endif // set tint color window.tintColor = UIColor.label