From 352cef66ede55afff29504bb5be10e1a2bacb14d Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 12 Nov 2022 21:37:57 +0100 Subject: [PATCH] adding a crashfix --- .../voicerecorder/adapters/RecordingsAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/adapters/RecordingsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/adapters/RecordingsAdapter.kt index 89c502f..17d6712 100644 --- a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/adapters/RecordingsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/adapters/RecordingsAdapter.kt @@ -128,7 +128,7 @@ class RecordingsAdapter( private fun askConfirmDelete() { val itemsCnt = selectedKeys.size - val firstItem = getSelectedItems().first() + val firstItem = getSelectedItems().firstOrNull() ?: return val items = if (itemsCnt == 1) { "\"${firstItem.title}\"" } else {