Correct usage of BatchUpdate so that UI remains responsive after error messages Issue #752
This commit is contained in:
parent
871dbbb752
commit
6527ac852c
|
@ -327,9 +327,10 @@ private extension SidebarOutlineDataSource {
|
||||||
|
|
||||||
BatchUpdate.shared.start()
|
BatchUpdate.shared.start()
|
||||||
source.account?.moveFeed(feed, from: source, to: destination) { result in
|
source.account?.moveFeed(feed, from: source, to: destination) { result in
|
||||||
|
BatchUpdate.shared.end()
|
||||||
switch result {
|
switch result {
|
||||||
case .success:
|
case .success:
|
||||||
BatchUpdate.shared.end()
|
break
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
NSApplication.shared.presentError(error)
|
NSApplication.shared.presentError(error)
|
||||||
}
|
}
|
||||||
|
@ -389,6 +390,7 @@ private extension SidebarOutlineDataSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
|
BatchUpdate.shared.end()
|
||||||
NSApplication.shared.presentError(error)
|
NSApplication.shared.presentError(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -409,6 +411,7 @@ private extension SidebarOutlineDataSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case .failure(let error):
|
case .failure(let error):
|
||||||
|
BatchUpdate.shared.end()
|
||||||
NSApplication.shared.presentError(error)
|
NSApplication.shared.presentError(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue