Improve recording contribution view. Replace TextView with interactive TableView.

This commit is contained in:
relikd
2020-09-04 09:14:23 +02:00
parent 4ae82fc763
commit 2ee0272a05
8 changed files with 495 additions and 220 deletions

View File

@@ -28,6 +28,18 @@ enum RecordingsDB {
AppDB?.recordingLogsGet(r) ?? []
}
/// Get dictionary of domains with `ts` in ascending order.
static func detailCluster(_ r: Recording) -> [String : [Timestamp]] {
var cluster: [String : [Timestamp]] = [:]
for (dom, ts) in details(r) {
if cluster[dom] == nil {
cluster[dom] = []
}
cluster[dom]!.append(ts - r.start)
}
return cluster
}
/// Update `title`, `appid`, and `notes` and post `NotifyRecordingChanged` notification.
static func update(_ r: Recording) {
AppDB?.recordingUpdate(r)