Fix covnerstaion expand/collapse button not working on all statuses
This commit is contained in:
parent
b47b08fa95
commit
7140590ccf
|
@ -133,13 +133,15 @@ class ConversationTableViewController: EnhancedTableViewController {
|
|||
@objc func toggleVisibilityButtonPressed() {
|
||||
showStatusesAutomatically = !showStatusesAutomatically
|
||||
|
||||
for (_, state) in statuses where state.collapsible == true {
|
||||
state.collapsed = !showStatusesAutomatically
|
||||
}
|
||||
|
||||
for cell in tableView.visibleCells {
|
||||
guard let cell = cell as? BaseStatusTableViewCell,
|
||||
cell.collapsible else { continue }
|
||||
cell.showStatusAutomatically = showStatusesAutomatically
|
||||
cell.setCollapsed(!showStatusesAutomatically, animated: false)
|
||||
let indexPath = tableView.indexPath(for: cell)!
|
||||
statuses[indexPath.row].state.collapsed = !showStatusesAutomatically
|
||||
}
|
||||
|
||||
// recalculate cell heights
|
||||
|
|
Loading…
Reference in New Issue