Fix using old style for show all statuses bar button item when showing a
conversation that initially expands all statuses
This commit is contained in:
parent
4a95ccccdb
commit
1a02319894
|
@ -122,8 +122,13 @@ class ConversationTableViewController: EnhancedTableViewController {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
let initialImage = showStatusesAutomatically ? ConversationTableViewController.hidePostsImage : ConversationTableViewController.showPostsImage
|
if #available(iOS 15.0, *) {
|
||||||
visibilityBarButtonItem = UIBarButtonItem(image: initialImage, style: .plain, target: self, action: #selector(toggleVisibilityButtonPressed))
|
visibilityBarButtonItem = UIBarButtonItem(image: ConversationTableViewController.showPostsImage, style: .plain, target: self, action: #selector(toggleVisibilityButtonPressed))
|
||||||
|
visibilityBarButtonItem.isSelected = showStatusesAutomatically
|
||||||
|
} else {
|
||||||
|
let initialImage = showStatusesAutomatically ? ConversationTableViewController.hidePostsImage : ConversationTableViewController.showPostsImage
|
||||||
|
visibilityBarButtonItem = UIBarButtonItem(image: initialImage, style: .plain, target: self, action: #selector(toggleVisibilityButtonPressed))
|
||||||
|
}
|
||||||
navigationItem.rightBarButtonItem = visibilityBarButtonItem
|
navigationItem.rightBarButtonItem = visibilityBarButtonItem
|
||||||
|
|
||||||
loadMainStatus()
|
loadMainStatus()
|
||||||
|
|
Loading…
Reference in New Issue