We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d5c318 commit d6d289dCopy full SHA for d6d289d
Sources/Mac/App/NewPost/NewPostViewController.swift
@@ -63,9 +63,18 @@ class NewPostViewController: NSViewController {
63
alert.beginSheetModal(for: view.window!, completionHandler: nil)
64
userToken.newPost(status: text).then(in: .main) { [weak self] post in
65
print(post)
66
- self?.view.window?.close()
67
- }.catch { error in
68
- print(error)
+ guard let window = self?.view.window else {
+ return
+ }
69
+ window.attachedSheet?.close()
70
+ window.close()
71
+ }.catch(in: .main) { [weak self] error in
72
73
74
75
76
+ let alert = NSAlert(error: error)
77
+ alert.beginSheetModal(for: window, completionHandler: nil)
78
}
79
80
0 commit comments