Add param name to callbacks for clarity

This commit is contained in:
Ensar Sarajčić 2023-07-25 08:24:11 +02:00
parent 5883e91bc4
commit 7aba993726
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ import com.simplemobiletools.commons.models.FileDirItem
import com.simplemobiletools.voicerecorder.models.Recording
import java.io.File
fun BaseSimpleActivity.deleteRecordings(recordingsToRemove: Collection<Recording>, callback: (Boolean) -> Unit) {
fun BaseSimpleActivity.deleteRecordings(recordingsToRemove: Collection<Recording>, callback: (success: Boolean) -> Unit) {
when {
isRPlus() -> {
val fileUris = recordingsToRemove.map { recording ->
@ -46,7 +46,7 @@ fun BaseSimpleActivity.deleteRecordings(recordingsToRemove: Collection<Recording
}
}
fun BaseSimpleActivity.restoreRecordings(recordingsToRestore: Collection<Recording>, callback: (Boolean) -> Unit) {
fun BaseSimpleActivity.restoreRecordings(recordingsToRestore: Collection<Recording>, callback: (success: Boolean) -> Unit) {
when {
isRPlus() -> {
val fileUris = recordingsToRestore.map { recording ->
@ -101,7 +101,7 @@ fun BaseSimpleActivity.restoreRecordings(recordingsToRestore: Collection<Recordi
}
}
fun BaseSimpleActivity.moveRecordingsToRecycleBin(recordingsToMove: Collection<Recording>, callback: (Boolean) -> Unit) {
fun BaseSimpleActivity.moveRecordingsToRecycleBin(recordingsToMove: Collection<Recording>, callback: (success: Boolean) -> Unit) {
when {
isRPlus() -> {
val fileUris = recordingsToMove.map { recording ->