aboutsummaryrefslogtreecommitdiff
path: root/shared/src/commonMain/kotlin/mx
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-02-27 00:05:29 -0600
committerIván Ávalos <avalos@disroot.org>2022-02-27 00:05:29 -0600
commit438c0a9cbb1bcb594028cc4c7fcedfe4a802ef6f (patch)
tree8050e2627e89137585eea44fa4d260992cee187d /shared/src/commonMain/kotlin/mx
parent136e4ebe289e286b62c8e37bcd512de6df0de0d3 (diff)
downloadetbsa-trackermap-mobile-438c0a9cbb1bcb594028cc4c7fcedfe4a802ef6f.tar.gz
etbsa-trackermap-mobile-438c0a9cbb1bcb594028cc4c7fcedfe4a802ef6f.tar.bz2
etbsa-trackermap-mobile-438c0a9cbb1bcb594028cc4c7fcedfe4a802ef6f.zip
Initial implementation of reports
Diffstat (limited to 'shared/src/commonMain/kotlin/mx')
-rw-r--r--shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt
index b2e97e6..29c4229 100644
--- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt
+++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt
@@ -49,7 +49,7 @@ class ReportController(
val reportFlow: MutableStateFlow<Report> = MutableStateFlow(Report.LoadingReport)
- fun fetchReport(
+ suspend fun fetchReport(
deviceId: Int,
reportType: ReportType?,
reportPeriod: ReportDates.ReportPeriod?,
@@ -65,13 +65,13 @@ class ReportController(
if (!xlsx) {
reportFlow.value = Report.LoadingReport
}
- GlobalScope.launch {
+ // GlobalScope.launch {
when (reportType) {
ReportType.POSITIONS -> fetchPositions(deviceId, previousDate, currentDate, xlsx)
ReportType.EVENTS -> fetchEvents(deviceId, previousDate, currentDate, eventTypes, xlsx)
ReportType.STOPS -> fetchStops(deviceId, previousDate, currentDate, xlsx)
}
- }
+ // }
}
private suspend fun fetchPositions(