mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
fix: Delete custom saveFolder files after recording if enabled
This commit is contained in:
parent
d0701868cf
commit
89ac35e92e
@ -133,6 +133,9 @@ data class BatchesFolder(
|
|||||||
when (type) {
|
when (type) {
|
||||||
BatchType.INTERNAL -> getInternalFolder().deleteRecursively()
|
BatchType.INTERNAL -> getInternalFolder().deleteRecursively()
|
||||||
BatchType.CUSTOM -> customFolder?.findFile(subfolderName)?.delete()
|
BatchType.CUSTOM -> customFolder?.findFile(subfolderName)?.delete()
|
||||||
|
?: customFolder?.findFile(subfolderName)?.listFiles()?.forEach {
|
||||||
|
it.delete()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +157,10 @@ fun AudioRecorderScreen(
|
|||||||
|
|
||||||
BatchesFolder.BatchType.CUSTOM -> {
|
BatchesFolder.BatchType.CUSTOM -> {
|
||||||
showSnackbar(audioRecorder.batchesFolder!!.customFolder!!.uri)
|
showSnackbar(audioRecorder.batchesFolder!!.customFolder!!.uri)
|
||||||
|
|
||||||
|
if (settings.audioRecorderSettings.deleteRecordingsImmediately) {
|
||||||
|
audioRecorder.batchesFolder!!.deleteRecordings()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error: Exception) {
|
} catch (error: Exception) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user