mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-28 17:59:31 +01:00
Ensure that the snapshot has items in it before testing section zero.
This commit is contained in:
parent
a1cb184fcb
commit
d1b8ac06af
@ -611,12 +611,14 @@ private extension MasterTimelineViewController {
|
||||
}
|
||||
|
||||
tableView.selectRow(at: nil, animated: false, scrollPosition: .top)
|
||||
if resetScroll && dataSource.snapshot().itemIdentifiers(inSection: 0).count > 0 {
|
||||
tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: .top, animated: false)
|
||||
if resetScroll {
|
||||
let snapshot = dataSource.snapshot()
|
||||
if snapshot.sectionIdentifiers.count > 0 && snapshot.itemIdentifiers(inSection: 0).count > 0 {
|
||||
tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: .top, animated: false)
|
||||
}
|
||||
}
|
||||
|
||||
updateToolbar()
|
||||
|
||||
}
|
||||
|
||||
func updateToolbar() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user