diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 427550a..37c098f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -2,6 +2,8 @@ name: Android CI on: push: + branches: + - main tags: - '*' @@ -11,16 +13,16 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: '11' - name: Cache Gradle packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -30,7 +32,7 @@ jobs: ${{ runner.os }}-gradle- - name: Set up Android SDK - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 with: api-level: 34 build-tools: 34.0.0 diff --git a/app/src/main/java/id/rashio/android/ui/screen/detection/DetectionScreen.kt b/app/src/main/java/id/rashio/android/ui/screen/detection/DetectionScreen.kt index 821f4af..232e028 100644 --- a/app/src/main/java/id/rashio/android/ui/screen/detection/DetectionScreen.kt +++ b/app/src/main/java/id/rashio/android/ui/screen/detection/DetectionScreen.kt @@ -78,7 +78,6 @@ fun DetectionScreen( } } - val file = context.createImageFile() val uri = FileProvider.getUriForFile( Objects.requireNonNull(context), @@ -191,6 +190,7 @@ fun DetectionScreen( modifier = Modifier .padding(top = 8.dp, bottom = 36.dp) .width(250.dp), + enabled = viewModel.imageDetection != null ) { Text(text = stringResource(R.string.mulai_deteksi)) }