mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Clean activities when the associated data is deleted
This commit is contained in:
@@ -859,6 +859,12 @@ private extension MasterFeedViewController {
|
||||
return
|
||||
}
|
||||
|
||||
if let folder = deleteNode.representedObject as? Folder {
|
||||
ActivityManager.shared.cleanUp(folder)
|
||||
} else if let feed = deleteNode.representedObject as? Feed {
|
||||
ActivityManager.shared.cleanUp(feed)
|
||||
}
|
||||
|
||||
var deleteIndexPaths = [indexPath]
|
||||
if coordinator.isExpanded(deleteNode) {
|
||||
for i in 0..<deleteNode.numberOfChildNodes {
|
||||
|
||||
@@ -114,6 +114,7 @@ struct SettingsDetailAccountView : View {
|
||||
|
||||
func delete() {
|
||||
AccountManager.shared.deleteAccount(account)
|
||||
ActivityManager.shared.cleanUp(account)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +121,7 @@ private extension DetailAccountViewController {
|
||||
let markAction = UIAlertAction(title: markTitle, style: .default) { [weak self] (action) in
|
||||
guard let account = self?.account else { return }
|
||||
AccountManager.shared.deleteAccount(account)
|
||||
ActivityManager.shared.cleanUp(account)
|
||||
self?.navigationController?.popViewController(animated: true)
|
||||
}
|
||||
alertController.addAction(markAction)
|
||||
|
||||
Reference in New Issue
Block a user