Files
session-ios/Session/Utilities/TraitObservingWindow.swift
Morgan Pretty b029728b6c Did some more theming, removed some files and fixed a couple of minor call issues
Applied theming logic to the ConversationTitleView, blocked banner
Removed a few redundant modals (replaced them with the "Confirmation Modal")
Removed some duplicate code
Fixed an issue where a synchronous start/stop behaviour was running on the main thread causing some UI blocking
Fixed an issue where the minimised call view could be covered by presenting view controllers
2022-09-02 17:32:13 +10:00

30 lines
925 B
Swift

// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
import UIKit
import SessionUIKit
public extension Notification.Name {
static let windowSubviewsChanged = Notification.Name("windowSubviewsChanged")
}
public class TraitObservingWindow: UIWindow {
public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
ThemeManager.traitCollectionDidChange(previousTraitCollection)
}
public override func didAddSubview(_ subview: UIView) {
super.didAddSubview(subview)
NotificationCenter.default.post(name: .windowSubviewsChanged, object: nil)
}
public override func willRemoveSubview(_ subview: UIView) {
super.willRemoveSubview(subview)
NotificationCenter.default.post(name: .windowSubviewsChanged, object: nil)
}
}