Discard recording if time criteria not met

This commit is contained in:
relikd
2020-08-31 12:18:36 +02:00
parent 7b7c5f3d9a
commit ff4218981f
10 changed files with 106 additions and 58 deletions

View File

@@ -23,10 +23,19 @@ enum PrefsShared {
get { Int("AutoDeleteLogsDays") }
set { Int("AutoDeleteLogsDays", newValue) }
}
static var CurrentlyRecording: Bool {
get { Bool("CurrentlyRecording") }
set { Bool("CurrentlyRecording", newValue) }
}
// MARK: - Recording State
enum CurrentRecordingState : Int {
case Off = 0, App = 1, Background = 2
}
extension PrefsShared {
static var CurrentlyRecording: CurrentRecordingState {
get { CurrentRecordingState(rawValue: Int("CurrentlyRecording")) ?? .Off }
set { Int("CurrentlyRecording", newValue.rawValue) }
}
}