about summary refs log tree commit diff
path: root/patches/expo-haptics+13.0.1.patch
diff options
context:
space:
mode:
authorKuwa Lee <kuwalee1069@gmail.com>2024-06-15 19:00:34 +0800
committerGitHub <noreply@github.com>2024-06-15 19:00:34 +0800
commit01f505d09f35b642c5ea9206f10e1ff68f4eb0d5 (patch)
tree0489ad6af184fbe086a2376023f2cdaea358f8eb /patches/expo-haptics+13.0.1.patch
parentb80594a554d91639eda70d311fcbc88c16c191a7 (diff)
parenteaef1446f2236cc4c8993e4c57d5bcc5bb2263d9 (diff)
downloadvoidsky-01f505d09f35b642c5ea9206f10e1ff68f4eb0d5.tar.zst
Merge branch 'bluesky-social:main' into zh
Diffstat (limited to 'patches/expo-haptics+13.0.1.patch')
-rw-r--r--patches/expo-haptics+13.0.1.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/patches/expo-haptics+13.0.1.patch b/patches/expo-haptics+13.0.1.patch
new file mode 100644
index 000000000..9c7b9a666
--- /dev/null
+++ b/patches/expo-haptics+13.0.1.patch
@@ -0,0 +1,13 @@
+diff --git a/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt b/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt
+index 1520465..6ea988a 100644
+--- a/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt
++++ b/node_modules/expo-haptics/android/src/main/java/expo/modules/haptics/HapticsModule.kt
+@@ -42,7 +42,7 @@ class HapticsModule : Module() {
+ 
+   private fun vibrate(type: HapticsVibrationType) {
+     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+-      vibrator.vibrate(VibrationEffect.createWaveform(type.timings, type.amplitudes, -1))
++      vibrator.vibrate(VibrationEffect.createWaveform(type.oldSDKPattern, intArrayOf(0, 100), -1))
+     } else {
+       @Suppress("DEPRECATION")
+       vibrator.vibrate(type.oldSDKPattern, -1)