diff options
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsViewModel.kt')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsViewModel.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsViewModel.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsViewModel.kt index 35ef343..98b8a34 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsViewModel.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsViewModel.kt @@ -26,6 +26,7 @@ class UnitReportsViewModel( class PositionsReport(val positions: Array<Position>) : Report() class EventsReport(val events: Array<Event>) : Report() class StopsReport(val stops: Array<Stop>) : Report() + object LoadingReport: Report() } enum class ReportType { @@ -76,6 +77,7 @@ class UnitReportsViewModel( Log.d("UnitReportsVM", "Current date:${dateFormat.format(currentDate)}") Log.d("UnitReportsVM", "Previous date:${dateFormat.format(previousDate)}") + report.postValue(Report.LoadingReport) viewModelScope.launch { when (reportType.value!!) { ReportType.POSITIONS -> fetchPositions(previousDate, currentDate) |