Recording details duplicate and display

This commit is contained in:
relikd
2020-04-08 18:53:00 +02:00
parent e7560479ee
commit d0056c0275
8 changed files with 120 additions and 51 deletions

View File

@@ -48,6 +48,7 @@ class DBWrapper {
// MARK: - Init
func initContentOfDB() {
QLog.Debug("SQLite path: \(URL.internalDB())")
DispatchQueue.global().async {
#if IOS_SIMULATOR
self.generateTestData()
@@ -226,7 +227,9 @@ class DBWrapper {
func listOfRecordings() -> [Recording] { AppDB?.allRecordings() ?? [] }
func recordingGetCurrent() -> Recording? { AppDB?.ongoingRecording() }
func recordingStartNew() -> Recording? { try? AppDB?.startNewRecording() }
func recordingStopAll() { AppDB?.stopRecordings() }
func recordingStop(_ r: inout Recording) { AppDB?.stopRecording(&r) }
func recordingPersist(_ r: Recording) { AppDB?.persistRecordingLogs(r) }
func recordingUpdate(_ r: Recording) {
AppDB?.updateRecording(r)
@@ -239,6 +242,10 @@ class DBWrapper {
}
}
func recordingDetails(_ r: Recording) -> [(domain: String?, count: Int32)]? {
AppDB?.getRecordingsLogs(r)
}
// MARK: - Helper methods