forked from shadowfacts/Tusker
Fix crash when opening conversations in new windows
This commit is contained in:
parent
4991da1622
commit
a4d43889ce
|
@ -362,11 +362,15 @@ extension MenuActionProvider {
|
|||
let options = UIWindowScene.ActivationRequestOptions()
|
||||
options.preferredPresentationStyle = .automatic
|
||||
actions.append(UIWindowScene.ActivationAction { (_) in
|
||||
return .init(userActivity: activity(), options: options, preview: nil)
|
||||
let activity = activity()
|
||||
activity.displaysAuxiliaryScene = true
|
||||
return .init(userActivity: activity, options: options, preview: nil)
|
||||
})
|
||||
} else if UIApplication.shared.supportsMultipleScenes {
|
||||
actions.append(createAction(identifier: "new_window", title: "Open in New Window", systemImageName: "rectangle.badge.plus", handler: { (_) in
|
||||
UIApplication.shared.requestSceneSessionActivation(nil, userActivity: activity(), options: nil, errorHandler: nil)
|
||||
let activity = activity()
|
||||
activity.displaysAuxiliaryScene = true
|
||||
UIApplication.shared.requestSceneSessionActivation(nil, userActivity: activity, options: nil, errorHandler: nil)
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue