Don't crash on early calls to update the toolbar

This commit is contained in:
Maurice Parker 2020-08-09 20:13:37 -05:00
parent 58498ef33e
commit e2de38647a
1 changed files with 3 additions and 0 deletions

View File

@ -626,8 +626,11 @@ private extension MasterTimelineViewController {
}
func updateToolbar() {
guard firstUnreadButton != nil else { return }
markAllAsReadButton.isEnabled = coordinator.isTimelineUnreadAvailable
firstUnreadButton.isEnabled = coordinator.isTimelineUnreadAvailable
if coordinator.isRootSplitCollapsed {
if let toolbarItems = toolbarItems, toolbarItems.last != firstUnreadButton {
var items = toolbarItems