Merge branch 'master' into fix-105-custom-filename

This commit is contained in:
Myzel394 2024-08-20 22:36:39 +02:00 committed by GitHub
commit da8dc613b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 28 additions and 13 deletions

View File

@ -23,6 +23,7 @@ runs:
run: echo "${{ inputs.keyStoreBase64 }}" | base64 -d > /home/runner/key.jks run: echo "${{ inputs.keyStoreBase64 }}" | base64 -d > /home/runner/key.jks
- name: Write Keystore properties 🗝️ - name: Write Keystore properties 🗝️
shell: bash
run: | run: |
echo "storeFile=/home/runner/key.jks" > key.properties echo "storeFile=/home/runner/key.jks" > key.properties
echo "storePassword=${{ inputs.signingStorePassword }}" >> key.properties echo "storePassword=${{ inputs.signingStorePassword }}" >> key.properties

View File

@ -94,23 +94,23 @@ android {
dependencies { dependencies {
implementation 'androidx.core:core-ktx:1.13.1' implementation 'androidx.core:core-ktx:1.13.1'
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0') implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.1' implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.3'
implementation 'androidx.activity:activity-compose:1.9.0' implementation 'androidx.activity:activity-compose:1.9.0'
implementation 'androidx.activity:activity-ktx:1.9.0' implementation 'androidx.activity:activity-ktx:1.9.0'
implementation platform('androidx.compose:compose-bom:2024.05.00') implementation platform('androidx.compose:compose-bom:2024.06.00')
implementation 'androidx.compose.ui:ui' implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-graphics' implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview' implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3:1.2.1' implementation 'androidx.compose.material3:material3:1.2.1'
implementation "androidx.compose.material:material-icons-extended:1.6.7" implementation "androidx.compose.material:material-icons-extended:1.6.8"
implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.lifecycle:lifecycle-service:2.8.1' implementation 'androidx.lifecycle:lifecycle-service:2.8.3'
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation platform('androidx.compose:compose-bom:2024.05.00') androidTestImplementation platform('androidx.compose:compose-bom:2024.06.00')
androidTestImplementation 'androidx.compose.ui:ui-test-junit4' androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
debugImplementation 'androidx.compose.ui:ui-tooling' debugImplementation 'androidx.compose.ui:ui-tooling'
debugImplementation 'androidx.compose.ui:ui-test-manifest' debugImplementation 'androidx.compose.ui:ui-test-manifest'
@ -135,7 +135,7 @@ dependencies {
implementation 'com.maxkeppeler.sheets-compose-dialogs:list:1.2.0' implementation 'com.maxkeppeler.sheets-compose-dialogs:list:1.2.0'
implementation 'com.maxkeppeler.sheets-compose-dialogs:input:1.2.0' implementation 'com.maxkeppeler.sheets-compose-dialogs:input:1.2.0'
def camerax_version = "1.3.3" def camerax_version = "1.3.4"
implementation "androidx.camera:camera-core:${camerax_version}" implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}" implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}" implementation "androidx.camera:camera-lifecycle:${camerax_version}"

View File

@ -398,11 +398,25 @@ abstract class BatchesFolder(
} }
} }
try {
context.contentResolver.delete( context.contentResolver.delete(
scopedMediaContentUri, scopedMediaContentUri,
"${MediaStore.MediaColumns.DISPLAY_NAME} IN (${deletableNames.joinToString(",")})", "${MediaStore.MediaColumns.DISPLAY_NAME} IN (${
deletableNames.joinToString(
","
) { "'$it'" }
})",
null, null,
) )
// This is unfortunate if the files can't be deleted, but let's just
// ignore it since we can't do anything about it
} catch (e: RuntimeException) {
// Probably file not found
e.printStackTrace()
} catch (e: IllegalArgumentException) {
// Strange filename, should not happen
e.printStackTrace()
}
} else { } else {
// TODO: Fix "would you like to try saving" -> Save button // TODO: Fix "would you like to try saving" -> Save button
legacyMediaFolder.listFiles()?.forEach { legacyMediaFolder.listFiles()?.forEach {