Recordings: Choose app instead of custom title

This commit is contained in:
relikd
2020-08-11 19:21:07 +02:00
parent 4af56b0cb1
commit 685f636d5b
15 changed files with 569 additions and 265 deletions

View File

@@ -64,12 +64,22 @@ class TVCPreviousRecords: UITableViewController, EditActionsRemove {
dataSource.count
}
// override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
// let lbl = QuickUI.label("Previous Recordings", align: .center)
// lbl.font = lbl.font.bold()
// lbl.backgroundColor = .sysBackground
// return lbl
// }
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "PreviousRecordCell")!
let x = dataSource[indexPath.row]
cell.textLabel?.text = x.title ?? x.fallbackTitle
cell.textLabel?.textColor = (x.title == nil) ? .systemGray : nil
cell.detailTextLabel?.text = "at \(DateFormat.seconds(x.start)), duration: \(TimeFormat.from(x.duration ?? 0))"
cell.detailTextLabel?.text = "at \(DateFormat.minutes(x.start)), duration: \(TimeFormat.from(x.duration ?? 0))"
cell.imageView?.image = x.isLongTerm ? nil : BundleIcon.image(x.appId)
cell.imageView?.layer.cornerRadius = 6.75
cell.imageView?.layer.masksToBounds = true
return cell
}