Merge pull request #684 from mastodon/fix-share-extension-reentry
Fix share extension reentry crash issue
This commit is contained in:
commit
c17169bb6d
|
@ -115,6 +115,10 @@ public class AppContext: ObservableObject {
|
|||
.store(in: &disposeBag)
|
||||
}
|
||||
|
||||
deinit {
|
||||
os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension AppContext {
|
||||
|
|
|
@ -21,7 +21,7 @@ final class ShareViewController: UIViewController {
|
|||
|
||||
var disposeBag = Set<AnyCancellable>()
|
||||
|
||||
let context = AppContext()
|
||||
let context = AppContext.shared
|
||||
private(set) lazy var viewModel = ShareViewModel(context: context)
|
||||
|
||||
let publishButton: UIButton = {
|
||||
|
@ -64,6 +64,10 @@ final class ShareViewController: UIViewController {
|
|||
return label
|
||||
}()
|
||||
|
||||
deinit {
|
||||
os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
extension ShareViewController {
|
||||
|
@ -325,3 +329,7 @@ extension ShareViewController {
|
|||
case missingAuthentication
|
||||
}
|
||||
}
|
||||
|
||||
extension AppContext {
|
||||
static let shared = AppContext()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue