diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 4394d71..bed3ed7 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -8,8 +8,23 @@ concurrency: cancel-in-progress: true jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5.0.0 + with: + fetch-depth: 0 + + - name: Setup + uses: ./.github/actions/setup + + - name: Lint commit messages + run: | + yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose lint: - runs-on: macos-latest + runs-on: macos-26 + needs: [commitlint] steps: - name: Checkout uses: actions/checkout@v5.0.0 @@ -110,10 +125,10 @@ jobs: JAVA_OPTS: '-XX:MaxHeapSize=6g' run: yarn build:android build-ios: - runs-on: macos-latest + runs-on: macos-26 needs: [lint, test, docs] env: - XCODE_VERSION: '26.0.1' + XCODE_VERSION: '26.2' steps: - name: Checkout uses: actions/checkout@v5.0.0 diff --git a/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt b/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt index 25339a8..5aacaa9 100644 --- a/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +++ b/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt @@ -10,7 +10,9 @@ import android.content.res.Configuration import android.graphics.Bitmap import android.location.Location import android.util.Size +import android.view.MotionEvent import android.view.View +import android.view.ViewGroup import android.widget.FrameLayout import androidx.lifecycle.Lifecycle import androidx.lifecycle.findViewTreeLifecycleOwner @@ -181,6 +183,30 @@ class GoogleMapsViewImpl( } } + private fun disallowParentTouchEventIntercept(disallowIntercept: Boolean): Boolean { + val parent = this.parent as? ViewGroup + if (parent != null) { + parent.requestDisallowInterceptTouchEvent(disallowIntercept) + return true + } + return false + } + + override fun dispatchTouchEvent(ev: MotionEvent): Boolean { + when (ev.actionMasked) { + MotionEvent.ACTION_DOWN -> { + disallowParentTouchEventIntercept( + googleMap?.uiSettings?.isScrollGesturesEnabled ?: false + ) + } + MotionEvent.ACTION_UP -> { + disallowParentTouchEventIntercept(false) + } + } + super.dispatchTouchEvent(ev) + return true + } + override fun onCameraMoveStarted(reason: Int) = onUi { if (!mapViewLoaded) return@onUi @@ -813,6 +839,7 @@ class GoogleMapsViewImpl( if (destroyed) return@onUi destroyed = true lifecycleObserver?.toDestroyedState() + lifecycleObserver = null markerBuilder.cancelAllJobs() clearMarkers() clearPolylines() diff --git a/package.json b/package.json index 9559251..4b89086 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "source": "src/index", "react-native": "src/index", "scripts": { + "commitlint": "commitlint", "typecheck:lib": "tsc --noEmit -p tsconfig.json", "typecheck:example": "tsc --noEmit -p example/tsconfig.json", "typecheck": "yarn typecheck:lib && yarn typecheck:example",