Skip to content
Snippets Groups Projects
Commit 7112df95 authored by Bruno Muniz's avatar Bruno Muniz :apple:
Browse files

Merge branch 'fix/key-window' into 'dev'

Fixes retrieving key window crash

See merge request elixxir/client-ios!76
parents dbadbfe9 91ff9a24
No related branches found
No related tags found
2 merge requests!77Releasing 1.1.6 (219),!76Fixes retrieving key window crash
......@@ -530,12 +530,10 @@ extension SingleChatController: KeyboardListenerDelegate {
}
func keyboardWillChangeFrame(info: KeyboardInfo) {
let keyWindow: UIWindow? = UIApplication.shared.connectedScenes
.filter { $0.activationState == .foregroundActive }
.compactMap { $0 as? UIWindowScene }
.first?
.windows
.first(where: \.isKeyWindow)
let keyWindow = UIApplication.shared
.connectedScenes
.flatMap { ($0 as? UIWindowScene)?.windows ?? [] }
.first { $0.isKeyWindow }
guard let keyWindow = keyWindow else {
fatalError("[keyboardWillChangeFrame]: Couldn't get key window")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment