mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
better code
This commit is contained in:
@@ -224,8 +224,7 @@ class TimelineTableViewController: UIViewController {
|
|||||||
|
|
||||||
/// Scrolls to the top of the timeline.
|
/// Scrolls to the top of the timeline.
|
||||||
private func scrollToTop(animated: Bool) {
|
private func scrollToTop(animated: Bool) {
|
||||||
let index = timelineItemsIDs.count - 1
|
guard !timelineItemsIDs.isEmpty else {
|
||||||
guard index >= 0 else {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
tableView.scrollToRow(at: IndexPath(item: timelineItemsIDs.count - 1, section: 0), at: .bottom, animated: animated)
|
tableView.scrollToRow(at: IndexPath(item: timelineItemsIDs.count - 1, section: 0), at: .bottom, animated: animated)
|
||||||
|
|||||||
Reference in New Issue
Block a user