diff --git a/dhis2_android_maps/src/main/java/org/dhis2/maps/views/MapSelectorActivity.kt b/dhis2_android_maps/src/main/java/org/dhis2/maps/views/MapSelectorActivity.kt index 562678fbeed..88b474234e2 100644 --- a/dhis2_android_maps/src/main/java/org/dhis2/maps/views/MapSelectorActivity.kt +++ b/dhis2_android_maps/src/main/java/org/dhis2/maps/views/MapSelectorActivity.kt @@ -5,7 +5,6 @@ import android.content.Context import android.content.Intent import android.location.LocationListener import android.os.Bundle -import android.view.MotionEvent import androidx.activity.compose.setContent import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity @@ -35,7 +34,6 @@ import org.dhis2.maps.utils.GeometryCoordinate import org.dhis2.maps.utils.addMoveListeners import org.dhis2.ui.theme.Dhis2Theme import org.hisp.dhis.android.core.common.FeatureType -import timber.log.Timber class MapSelectorActivity : AppCompatActivity() { @@ -157,15 +155,6 @@ class MapSelectorActivity : AppCompatActivity() { mapStyles = mapSelectorViewModel.fetchMapStyles(), onInitializationFinished = { initZoom(mapSelectorViewModel.screenState.value) - it.mapView.setOnTouchListener { _, event -> - if (event.action == MotionEvent.ACTION_DOWN) { - Timber.tag("MAP").d("Touched") - mapSelectorViewModel.onMapTouched() - } else if (event.action == MotionEvent.ACTION_UP) { - mapSelectorViewModel.onMapTouched(false) - } - super.onTouchEvent(event) - } it.map?.addMoveListeners( onIdle = { bounds -> mapSelectorViewModel.updateCurrentVisibleRegion(bounds) diff --git a/dhis2_android_maps/src/main/java/org/dhis2/maps/views/MapSelectorViewModel.kt b/dhis2_android_maps/src/main/java/org/dhis2/maps/views/MapSelectorViewModel.kt index 4e315b048c3..bd49e77bd68 100644 --- a/dhis2_android_maps/src/main/java/org/dhis2/maps/views/MapSelectorViewModel.kt +++ b/dhis2_android_maps/src/main/java/org/dhis2/maps/views/MapSelectorViewModel.kt @@ -482,18 +482,4 @@ class MapSelectorViewModel( ) } } - - fun onMapTouched(actionDown: Boolean = true) { - if (canCaptureManually()) { - val captureMode = if (actionDown) CaptureMode.MANUAL_SWIPE else CaptureMode.MANUAL - updateScreenState( - mapData = GetMapData( - _currentFeature, - _screenState.value.locationItems, - captureMode, - ), - captureMode = captureMode, - ) - } - } }