From e4e6b842cbd3064521861d08765fa9a5b773b7a9 Mon Sep 17 00:00:00 2001 From: Timo T Date: Sat, 28 May 2022 00:11:14 +0200 Subject: [PATCH] Refactor: Remove superfluous postCrashHandlingRunnable (#6974) --- .../src/com/unciv/app/CustomFileLocationHelperAndroid.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/android/src/com/unciv/app/CustomFileLocationHelperAndroid.kt b/android/src/com/unciv/app/CustomFileLocationHelperAndroid.kt index 195e619871..100ddb2f40 100644 --- a/android/src/com/unciv/app/CustomFileLocationHelperAndroid.kt +++ b/android/src/com/unciv/app/CustomFileLocationHelperAndroid.kt @@ -81,14 +81,12 @@ class CustomFileLocationHelperAndroid(private val activity: Activity) : CustomFi } fun onActivityResult(requestCode: Int, data: Intent?) { - val callback = synchronized(this) { + val activityCallback = synchronized(this) { val index = callbacks.indexOfFirst { it.requestCode == requestCode } if (index == -1) return callbacks.removeAt(index) } - postCrashHandlingRunnable { - callback.callback(data?.data) - } + activityCallback.callback(data?.data) } }