Indicate background recording needs more time

This commit is contained in:
relikd
2020-09-12 11:32:06 +02:00
parent b88874b38b
commit 33b9cab8a8
2 changed files with 14 additions and 5 deletions

View File

@@ -33,11 +33,13 @@ extension FilterOptions {
}
extension Recording {
static let minTimeLongTerm: Timestamp = .hours(1)
var fallbackTitle: String { get {
isLongTerm ? "Background Recording" : "Unnamed Recording #\(id)"
} }
var duration: Timestamp { get { (stop ?? .now()) - start } }
var isLongTerm: Bool { duration > Timestamp.hours(1) }
var isLongTerm: Bool { duration > Recording.minTimeLongTerm }
var isShared: Bool { uploadkey?.count ?? 0 > 0}
}