Reload visible cells after expanding/collapsing folders since the folder row might not get updated

This commit is contained in:
Maurice Parker 2019-09-09 10:06:13 -05:00
parent 77373c5bc0
commit 98761510dd
1 changed files with 12 additions and 4 deletions

View File

@ -410,25 +410,33 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
@objc func expandSelectedRows(_ sender: Any?) {
if let indexPath = coordinator.currentFeedIndexPath {
coordinator.expandFolder(indexPath)
self.applyChanges(animate: true)
self.applyChanges(animate: true) {
self.reloadAllVisibleCells()
}
}
}
@objc func collapseSelectedRows(_ sender: Any?) {
if let indexPath = coordinator.currentFeedIndexPath {
coordinator.collapseFolder(indexPath)
self.applyChanges(animate: true)
self.applyChanges(animate: true) {
self.reloadAllVisibleCells()
}
}
}
@objc func expandAll(_ sender: Any?) {
coordinator.expandAllSectionsAndFolders()
self.applyChanges(animate: true)
self.applyChanges(animate: true) {
self.reloadAllVisibleCells()
}
}
@objc func collapseAllExceptForGroupItems(_ sender: Any?) {
coordinator.collapseAllFolders()
self.applyChanges(animate: true)
self.applyChanges(animate: true) {
self.reloadAllVisibleCells()
}
}
// MARK: API