mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Displays “TODAY” as section header for logged errors that occured that day
This commit is contained in:
committed by
Joseph Mattello
parent
14bd58e741
commit
ae6ed99dc4
@@ -287,8 +287,15 @@ extension ErrorLogViewController
|
||||
override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String?
|
||||
{
|
||||
let indexPath = IndexPath(row: 0, section: section)
|
||||
|
||||
let loggedError = self.dataSource.item(at: indexPath)
|
||||
return loggedError.localizedDateString
|
||||
|
||||
if Calendar.current.isDateInToday(loggedError.date)
|
||||
{
|
||||
return NSLocalizedString("Today", comment: "")
|
||||
}
|
||||
else
|
||||
{
|
||||
return loggedError.localizedDateString
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user