diff options
author | Isidro Henoch <imhenoch@protonmail.com> | 2022-01-17 13:53:21 -0600 |
---|---|---|
committer | Isidro Henoch <imhenoch@protonmail.com> | 2022-01-17 14:18:10 -0600 |
commit | 76747c473656ecc4f63f28212326f90dc1e53643 (patch) | |
tree | a0d891a3455520805b3bfe8fb051a5ab41890bc2 /androidApp/src/main/java/mx/trackermap/TrackerMap/android/map | |
parent | 9cde1ebda80ed802121597421b2286e58fcb4b1d (diff) | |
download | etbsa-trackermap-mobile-76747c473656ecc4f63f28212326f90dc1e53643.tar.gz etbsa-trackermap-mobile-76747c473656ecc4f63f28212326f90dc1e53643.tar.bz2 etbsa-trackermap-mobile-76747c473656ecc4f63f28212326f90dc1e53643.zip |
Little update to some fragments constructor
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android/map')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt index 3ab25e4..b6396c8 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt @@ -6,23 +6,27 @@ import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.Toast import androidx.core.text.HtmlCompat +import androidx.fragment.app.Fragment +import androidx.fragment.app.viewModels +import kotlin.time.ExperimentalTime import kotlinx.coroutines.DelicateCoroutinesApi import mx.trackermap.TrackerMap.android.R import mx.trackermap.TrackerMap.android.databinding.UnitMapFragmentBinding import mx.trackermap.TrackerMap.android.details.DetailsActivity import mx.trackermap.TrackerMap.android.shared.MarkerTransformations import mx.trackermap.TrackerMap.android.shared.UnitRenderData -import mx.trackermap.TrackerMap.android.units.UnitFragment import mx.trackermap.TrackerMap.android.units.UnitsViewModel import mx.trackermap.TrackerMap.client.models.MapLayer import mx.trackermap.TrackerMap.client.models.UnitInformation -import kotlin.time.ExperimentalTime @DelicateCoroutinesApi @ExperimentalTime -class UnitMapFragment(private val unitsViewModel: UnitsViewModel) : UnitFragment(unitsViewModel) { +class UnitMapFragment : Fragment() { + + private val unitsViewModel: UnitsViewModel by viewModels( + ownerProducer = { requireActivity() } + ) private var _binding: UnitMapFragmentBinding? = null private val binding get() = _binding!! |