aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2021-12-16 02:52:28 -0600
committerIván Ávalos <avalos@disroot.org>2021-12-16 02:52:28 -0600
commit4ff66b74fa8f647e988f909ee0e0239b542f7fdd (patch)
tree0049335782d9ed10242ca994c3c111268768b94e /androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices
parent04b33cf071672a955c3e3229f8d48de4c215dc18 (diff)
parent6ed24f2be979187d90ab3250d02d8b71fc570535 (diff)
downloadetbsa-trackermap-mobile-4ff66b74fa8f647e988f909ee0e0239b542f7fdd.tar.gz
etbsa-trackermap-mobile-4ff66b74fa8f647e988f909ee0e0239b542f7fdd.tar.bz2
etbsa-trackermap-mobile-4ff66b74fa8f647e988f909ee0e0239b542f7fdd.zip
Merge remote-tracking branch 'origin/main'
# Conflicts: # androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesAdapter.kt # androidApp/src/main/res/layout/unit_item.xml
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/DevicesFragment.kt7
1 files changed, 7 insertions, 0 deletions
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 a3ed7a8..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
@@ -1,5 +1,6 @@
package mx.trackermap.TrackerMap.android.devices
+import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
@@ -9,6 +10,7 @@ import androidx.fragment.app.Fragment
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.UnitsViewModel
import mx.trackermap.TrackerMap.client.models.UnitInformation
import org.koin.androidx.viewmodel.ext.android.viewModel
@@ -62,5 +64,10 @@ class DevicesFragment : Fragment() {
private fun itemAction(unit: UnitInformation, action: Action) {
Log.d("DevicesFragment", "Action: $action - Unit: $unit")
+ val activity = requireActivity()
+ val intent = Intent(activity.applicationContext, DetailsActivity::class.java)
+ intent.putExtra(DetailsActivity.DEVICE_ID_EXTRA, unit.device.id)
+ intent.putExtra(DetailsActivity.ACTION_EXTRA, action)
+ startActivity(intent)
}
} \ No newline at end of file