mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Periphery cleanup (#5893)
This commit is contained in:
@@ -12,7 +12,6 @@ import SwiftUI
|
||||
class WindowManager: SecureWindowManagerProtocol {
|
||||
private let appDelegate: AppDelegate
|
||||
weak var mainScene: UIWindowScene?
|
||||
weak var mainSession: UISceneSession?
|
||||
weak var delegate: SecureWindowManagerDelegate?
|
||||
|
||||
private(set) var mainWindow: UIWindow!
|
||||
@@ -34,7 +33,6 @@ class WindowManager: SecureWindowManagerProtocol {
|
||||
[mainWindow, overlayWindow, alternateWindow]
|
||||
}
|
||||
|
||||
// periphery:ignore - auto cancels when reassigned
|
||||
/// The task used to switch windows, so that we don't get stuck in the wrong state with a quick switch.
|
||||
@CancellableTask private var switchTask: Task<Void, Error>?
|
||||
/// A duration that allows window switching to wait a couple of frames to avoid a transition through black.
|
||||
@@ -62,7 +60,6 @@ class WindowManager: SecureWindowManagerProtocol {
|
||||
}
|
||||
|
||||
mainScene = scene
|
||||
mainSession = session
|
||||
|
||||
// Restore the previous window size on macOS as this isn't automatic.
|
||||
if let previousSize = mainWindow?.frame.size {
|
||||
@@ -94,7 +91,6 @@ class WindowManager: SecureWindowManagerProtocol {
|
||||
func handleSceneDisconnection(_ scene: UIWindowScene) {
|
||||
if scene == mainScene {
|
||||
mainScene = nil
|
||||
mainSession = nil
|
||||
// Leave the mainWindow so we can reapply it's size on macOS.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user