Skip to content

Commit ee62bfa

Browse files
committed
Try to fix Range initial value set
1 parent 54039d1 commit ee62bfa

File tree

3 files changed

+30
-12
lines changed

3 files changed

+30
-12
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Build Android Release
22

33
on:
4-
# workflow_dispatch:
54
push:
65
branches:
76
- main
@@ -12,26 +11,44 @@ jobs:
1211

1312
steps:
1413
- uses: actions/checkout@v4
14+
1515
- name: set up JDK 19
1616
uses: actions/setup-java@v4
1717
with:
1818
java-version: '19'
1919
distribution: 'temurin'
2020
cache: gradle
2121

22-
- uses: actions/checkout@v3
2322
- uses: oven-sh/setup-bun@v2
2423

24+
- name: Cache Gradle dependencies
25+
uses: actions/cache@v3
26+
with:
27+
path: |
28+
~/.gradle/caches
29+
~/.gradle/wrapper
30+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
31+
restore-keys: |
32+
${{ runner.os }}-gradle-
33+
34+
- name: Cache Android build outputs
35+
uses: actions/cache@v3
36+
with:
37+
path: |
38+
android/.gradle
39+
android/app/build
40+
key: ${{ runner.os }}-android-build-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
41+
restore-keys: |
42+
${{ runner.os }}-android-build-
43+
2544
- name: Install npm dependencies with bun
26-
run: |
27-
bun install
45+
run: bun install
2846

2947
- name: Grant execute permission for gradlew
3048
run: cd android && chmod +x gradlew
3149

3250
- name: Build Android Release
33-
run: |
34-
cd android && ./gradlew assembleRelease
51+
run: cd android && ./gradlew assembleRelease
3552

3653
- name: Upload Artifact
3754
uses: actions/upload-artifact@v4

android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ def jscFlavor = 'org.webkit:android-jsc:+'
8787
* This reads the value from reactNativeArchitectures in your gradle.properties
8888
* file and works together with the --active-arch-only flag of react-native run-android.
8989
*/
90-
def reactNativeArchitectures() {
91-
def value = project.getProperties().get("reactNativeArchitectures")
92-
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
93-
}
90+
// def reactNativeArchitectures() {
91+
// def value = project.getProperties().get("reactNativeArchitectures")
92+
// return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
93+
// }
9494

9595
android {
9696
ndkVersion rootProject.ext.ndkVersion

src/components/Range.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ export default function Range({ value, setValue, Left, Right, accent = Colors.ac
1818
const scale = useSharedValue(1)
1919

2020
useEffect(() => {
21-
// offset.value = withTiming(containerWidth * value)
22-
offset.value = containerWidth * value
21+
if (containerWidth > 0) {
22+
offset.value = withTiming(containerWidth * value)
23+
}
2324
// eslint-disable-next-line react-hooks/exhaustive-deps
2425
}, [containerWidth])
2526

0 commit comments

Comments
 (0)