forked from shadowfacts/Tusker
Use visibility bar button item selection state instead of changing icon
This commit is contained in:
parent
1a5b958b1a
commit
91f1a5195c
|
@ -304,7 +304,16 @@ class ConversationTableViewController: EnhancedTableViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func toggleVisibilityButtonPressed() {
|
@objc func toggleVisibilityButtonPressed() {
|
||||||
|
#if SDK_IOS_15
|
||||||
|
if #available(iOS 15.0, *) {
|
||||||
|
visibilityBarButtonItem.isSelected = !visibilityBarButtonItem.isSelected
|
||||||
|
showStatusesAutomatically = visibilityBarButtonItem.isSelected
|
||||||
|
} else {
|
||||||
showStatusesAutomatically = !showStatusesAutomatically
|
showStatusesAutomatically = !showStatusesAutomatically
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
showStatusesAutomatically = !showStatusesAutomatically
|
||||||
|
#endif
|
||||||
|
|
||||||
let snapshot = dataSource.snapshot()
|
let snapshot = dataSource.snapshot()
|
||||||
for case let .status(id: _, state: state) in snapshot.itemIdentifiers where state.collapsible == true {
|
for case let .status(id: _, state: state) in snapshot.itemIdentifiers where state.collapsible == true {
|
||||||
|
|
Loading…
Reference in New Issue