Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Build
on:
push:
pull_request:
branches:
- master
- main
pull_request:
workflow_dispatch:

jobs:
lint:
Expand Down Expand Up @@ -95,8 +96,9 @@ jobs:
- name: Install Dependencies
run: yarn && yarn bootstrap
- name: Install Podfiles
run: cd example && npx pod-install
run: cd example && RCT_USE_PREBUILT_RNCORE=1 RCT_USE_RN_DEP=1 npx pod-install
- name: Print React Native Info
run: cd example && npx react-native info
- name: Build example app
run: cd example && yarn ios --no-packager
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw the previous code finish in 7s because no emulators were present

run: xcodebuild -scheme ReactTestApp -workspace MenuExample.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug
working-directory: example/ios
13 changes: 0 additions & 13 deletions android/.settings/org.eclipse.buildship.core.prefs

This file was deleted.

Binary file removed android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 0 additions & 6 deletions android/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

11 changes: 5 additions & 6 deletions android/src/main/java/com/reactnativemenu/MenuView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ class MenuView(private val mContext: ReactContext) : ReactViewGroup(mContext) {
private var mIsOnLongPress = false
private var mGestureDetector: GestureDetector
private var mHitSlopRect: Rect? = null
set(value) {
super.hitSlopRect = value
mHitSlopRect = value
updateTouchDelegate()
}

init {
mGestureDetector = GestureDetector(mContext, object : GestureDetector.SimpleOnGestureListener() {
Expand All @@ -47,12 +52,6 @@ class MenuView(private val mContext: ReactContext) : ReactViewGroup(mContext) {
prepareMenu()
}

override fun setHitSlopRect(rect: Rect?) {
super.setHitSlopRect(rect)
mHitSlopRect = rect
updateTouchDelegate()
}

override fun onInterceptTouchEvent(ev: MotionEvent): Boolean {
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ abstract class MenuViewManagerBase : ReactClippingViewManager<MenuView>() {
fun setHitSlop(view: ReactViewGroup, @Nullable hitSlop: ReadableMap?) {
if (hitSlop == null) {
// We should keep using setters as `Val cannot be reassigned`
view.setHitSlopRect(null)
view.hitSlopRect = null
} else {
view.setHitSlopRect(
view.hitSlopRect = (
Rect(
if (hitSlop.hasKey("left"))
PixelUtil.toPixelFromDIP(hitSlop.getDouble("left")).toInt()
Expand Down Expand Up @@ -206,7 +206,7 @@ abstract class MenuViewManagerBase : ReactClippingViewManager<MenuView>() {

@ReactProp(name = ViewProps.OVERFLOW)
fun setOverflow(view: ReactViewGroup, overflow: String?) {
view.setOverflow(overflow)
view.overflow = overflow
}

@ReactProp(name = "backfaceVisibility")
Expand Down
24 changes: 12 additions & 12 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ buildscript {

allprojects {
repositories {
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url({
def searchDir = rootDir.toPath()
do {
def p = searchDir.resolve("node_modules/react-native/android")
if (p.toFile().exists()) {
return p.toRealPath().toString()
{
def searchDir = rootDir.toPath()
do {
def p = searchDir.resolve("node_modules/react-native/android")
if (p.toFile().exists()) {
maven {
url(p.toRealPath().toString())
}
} while (searchDir = searchDir.getParent())
throw new GradleException("Could not find `react-native`");
}())
}
break
}
} while (searchDir = searchDir.getParent())
// As of 0.80, React Native is no longer installed from npm
}()
mavenCentral()
google()
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading
Loading