Fix crash when opening & closing Preferences after changing account
The old ProfileHeaderView was being leaked, and it was still listening to the preferencesDidChange notification, but crashing because its delegate (and therefore MastodonController) had been dealloc'd.
This commit is contained in:
parent
9d5c004ec4
commit
02ba45fa34
|
@ -223,8 +223,8 @@ extension MenuPreviewProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func openInSafariAction(url: URL) -> UIAction {
|
private func openInSafariAction(url: URL) -> UIAction {
|
||||||
return createAction(identifier: "openinsafari", title: "Open in Safari", systemImageName: "safari", handler: { (_) in
|
return createAction(identifier: "openinsafari", title: "Open in Safari", systemImageName: "safari", handler: { [weak self] (_) in
|
||||||
self.navigationDelegate?.selected(url: url, allowUniversalLinks: false)
|
self?.navigationDelegate?.selected(url: url, allowUniversalLinks: false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue