diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-02-13 21:53:43 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-02-13 21:53:43 -0600 |
commit | 894b276f0b4e8ea840586727b1708ca0d8ebdc05 (patch) | |
tree | 9bed4408f6df0dd8cb7e9e3c6b3698dd9ea5375b /shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers | |
parent | fbe87f8e0091adcddd9ec195d0ae6d7829be3c3c (diff) | |
download | etbsa-trackermap-mobile-894b276f0b4e8ea840586727b1708ca0d8ebdc05.tar.gz etbsa-trackermap-mobile-894b276f0b4e8ea840586727b1708ca0d8ebdc05.tar.bz2 etbsa-trackermap-mobile-894b276f0b4e8ea840586727b1708ca0d8ebdc05.zip |
Changed Array<> to List<> for iOS compatibility
Diffstat (limited to 'shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers')
-rw-r--r-- | shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt | 12 |
1 files changed, 6 insertions, 6 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 46bc445..b2e97e6 100644 --- a/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt +++ b/shared/src/commonMain/kotlin/mx/trackermap/TrackerMap/controllers/ReportController.kt @@ -36,9 +36,9 @@ class ReportController( ): Injectable { sealed class Report { - class PositionsReport(val positions: Array<Position>) : Report() - class EventsReport(val events: Array<EventInformation>) : Report() - class StopsReport(val stops: Array<Stop>) : Report() + class PositionsReport(val positions: List<Position>) : Report() + class EventsReport(val events: List<EventInformation>) : Report() + class StopsReport(val stops: List<Stop>) : Report() class XlsxReport(val data: ByteArray) : Report() object LoadingReport: Report() } @@ -82,7 +82,7 @@ class ReportController( ) { if (!xlsx) { val result = reportsApi.reportsRouteGet(from, to, deviceId) - reportFlow.value = Report.PositionsReport(result) + reportFlow.value = Report.PositionsReport(result.toList()) } else { val result = reportsApi.reportsRouteGetXlsx(from, to, deviceId) reportFlow.value = Report.XlsxReport(result) @@ -114,7 +114,7 @@ class ReportController( )) } - reportFlow.value = Report.EventsReport(result.toTypedArray()) + reportFlow.value = Report.EventsReport(result) } else { val result = reportsApi.reportsEventsGetXlsx( from, to, EventInformation.reportTypesToStrings(types), deviceId @@ -132,7 +132,7 @@ class ReportController( ) { if (!xlsx) { val result = reportsApi.reportsStopsGet(from, to, deviceId) - reportFlow.value = Report.StopsReport(result) + reportFlow.value = Report.StopsReport(result.toList()) } else { val result = reportsApi.reportsStopsGetXlsx(from, to, deviceId) reportFlow.value = Report.XlsxReport(result) |