aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices
diff options
context:
space:
mode:
authorIsidro Henoch <imhenoch@protonmail.com>2021-12-16 01:50:17 -0600
committerIsidro Henoch <imhenoch@protonmail.com>2021-12-16 01:50:17 -0600
commit95af352c7ae6b7f06d3248aac18b3a65cefc803a (patch)
treeeb2647294f39d691c1dd09b228ae7a91b883048b /androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices
parentf08ef2459cfa0f3582db77372b1e534b1291cdc0 (diff)
downloadetbsa-trackermap-mobile-95af352c7ae6b7f06d3248aac18b3a65cefc803a.tar.gz
etbsa-trackermap-mobile-95af352c7ae6b7f06d3248aac18b3a65cefc803a.tar.bz2
etbsa-trackermap-mobile-95af352c7ae6b7f06d3248aac18b3a65cefc803a.zip
Shows the details section
- Show tabs with each details section, the sections doesn't display any useful information for now - Properly converts speed to km/h
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt2
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt1
2 files changed, 1 insertions, 2 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt
index 4aa210d..5d512f0 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt
@@ -32,7 +32,7 @@ class DevicesAdapter(
holder.binding.apply {
unitName.text = unit.device.name
driverName.text = unit.device.contact
- unitSpeed.text = "${unit.position?.speed ?: "--"} Km/h"
+ unitSpeed.text = "${unit.position?.speed?.times(1.852) ?: "--"} Km/h"
lastAddress.text = unit.position?.address ?: "Unknown location"
lastDate.text = "yyyy/mm/dd, hh:mm"
actionCallback?.let { callback ->
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt
index 2c11dc2..6beacec 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt
@@ -11,7 +11,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
import kotlinx.coroutines.DelicateCoroutinesApi
import mx.trackermap.TrackerMap.android.databinding.DevicesFragmentBinding
import mx.trackermap.TrackerMap.android.details.DetailsActivity
-import mx.trackermap.TrackerMap.android.units.UnitsActivity
import mx.trackermap.TrackerMap.android.units.UnitsViewModel
import mx.trackermap.TrackerMap.client.models.UnitInformation
import org.koin.androidx.viewmodel.ext.android.viewModel