From 6702d345c6c572f0c5e729ce222496da945800a0 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 26 Mar 2023 16:36:37 +0200 Subject: [PATCH] Fix crash on login --- app/release/output-metadata.json | 32 +++++++++---------- .../libretube/ui/dialogs/LoginDialog.kt | 5 ++- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index cbf3376d0e..0639a001a7 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -11,8 +11,8 @@ "type": "UNIVERSAL", "filters": [], "attributes": [], - "versionCode": 29, - "versionName": "0.12.0", + "versionCode": 32, + "versionName": "0.13.1", "outputFile": "app-universal-release.apk" }, { @@ -20,26 +20,26 @@ "filters": [ { "filterType": "ABI", - "value": "x86" + "value": "armeabi-v7a" } ], "attributes": [], - "versionCode": 29, - "versionName": "0.12.0", - "outputFile": "app-x86-release.apk" + "versionCode": 32, + "versionName": "0.13.1", + "outputFile": "app-armeabi-v7a-release.apk" }, { "type": "ONE_OF_MANY", "filters": [ { "filterType": "ABI", - "value": "armeabi-v7a" + "value": "arm64-v8a" } ], "attributes": [], - "versionCode": 29, - "versionName": "0.12.0", - "outputFile": "app-armeabi-v7a-release.apk" + "versionCode": 32, + "versionName": "0.13.1", + "outputFile": "app-arm64-v8a-release.apk" }, { "type": "ONE_OF_MANY", @@ -50,8 +50,8 @@ } ], "attributes": [], - "versionCode": 29, - "versionName": "0.12.0", + "versionCode": 32, + "versionName": "0.13.1", "outputFile": "app-x86_64-release.apk" }, { @@ -59,13 +59,13 @@ "filters": [ { "filterType": "ABI", - "value": "arm64-v8a" + "value": "x86" } ], "attributes": [], - "versionCode": 29, - "versionName": "0.12.0", - "outputFile": "app-arm64-v8a-release.apk" + "versionCode": 32, + "versionName": "0.13.1", + "outputFile": "app-x86-release.apk" } ], "elementType": "File" diff --git a/app/src/main/java/com/github/libretube/ui/dialogs/LoginDialog.kt b/app/src/main/java/com/github/libretube/ui/dialogs/LoginDialog.kt index 422cef9835..d5706c9332 100644 --- a/app/src/main/java/com/github/libretube/ui/dialogs/LoginDialog.kt +++ b/app/src/main/java/com/github/libretube/ui/dialogs/LoginDialog.kt @@ -19,6 +19,7 @@ import com.github.libretube.helpers.PreferenceHelper import com.google.android.material.dialog.MaterialAlertDialogBuilder import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import kotlinx.serialization.decodeFromString import retrofit2.HttpException @@ -97,7 +98,9 @@ class LoginDialog( PreferenceHelper.setToken(response.token) PreferenceHelper.setUsername(login.username) - onLogin.invoke() + withContext(Dispatchers.Main) { + onLogin.invoke() + } dialog?.dismiss() } }