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 /androidApp/src/main | |
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 'androidApp/src/main')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt index 22c75f4..60ad531 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/details/reports/UnitReportsFragment.kt @@ -149,16 +149,16 @@ class UnitReportsFragment : Fragment() { when (report) { is ReportController.Report.PositionsReport -> { mapFragment.display(unitReportsViewModel.geofences.value!!) - mapFragment.display(report.positions, isReport = true, center = true) + mapFragment.display(report.positions.toTypedArray(), isReport = true, center = true) showMap(true) } is ReportController.Report.EventsReport -> { - display(report.events) + display(report.events.toTypedArray()) showMap(false) } is ReportController.Report.StopsReport -> { mapFragment.display(unitReportsViewModel.geofences.value!!) - mapFragment.display(report.stops) + mapFragment.display(report.stops.toTypedArray()) showMap(true) } is ReportController.Report.XlsxReport -> { @@ -232,7 +232,7 @@ class UnitReportsFragment : Fragment() { binding.reportsMapContainer.visibility = View.GONE binding.eventsTable.removeViews(1, max(0, binding.eventsTable.childCount - 1)) - val context = context!! + val context = requireContext() events.forEach { event -> val layoutParams = TableRow.LayoutParams() layoutParams.setMargins( |