Merge pull request #3406 from Bnyro/master

Fix crash on login
This commit is contained in:
Bnyro 2023-03-26 16:36:58 +02:00 committed by GitHub
commit 4470e4f757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 33 deletions

View File

@ -11,23 +11,10 @@
"type": "UNIVERSAL", "type": "UNIVERSAL",
"filters": [], "filters": [],
"attributes": [], "attributes": [],
"versionCode": 29, "versionCode": 32,
"versionName": "0.12.0", "versionName": "0.13.1",
"outputFile": "app-universal-release.apk" "outputFile": "app-universal-release.apk"
}, },
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86"
}
],
"attributes": [],
"versionCode": 29,
"versionName": "0.12.0",
"outputFile": "app-x86-release.apk"
},
{ {
"type": "ONE_OF_MANY", "type": "ONE_OF_MANY",
"filters": [ "filters": [
@ -37,23 +24,10 @@
} }
], ],
"attributes": [], "attributes": [],
"versionCode": 29, "versionCode": 32,
"versionName": "0.12.0", "versionName": "0.13.1",
"outputFile": "app-armeabi-v7a-release.apk" "outputFile": "app-armeabi-v7a-release.apk"
}, },
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86_64"
}
],
"attributes": [],
"versionCode": 29,
"versionName": "0.12.0",
"outputFile": "app-x86_64-release.apk"
},
{ {
"type": "ONE_OF_MANY", "type": "ONE_OF_MANY",
"filters": [ "filters": [
@ -63,9 +37,35 @@
} }
], ],
"attributes": [], "attributes": [],
"versionCode": 29, "versionCode": 32,
"versionName": "0.12.0", "versionName": "0.13.1",
"outputFile": "app-arm64-v8a-release.apk" "outputFile": "app-arm64-v8a-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86_64"
}
],
"attributes": [],
"versionCode": 32,
"versionName": "0.13.1",
"outputFile": "app-x86_64-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86"
}
],
"attributes": [],
"versionCode": 32,
"versionName": "0.13.1",
"outputFile": "app-x86-release.apk"
} }
], ],
"elementType": "File" "elementType": "File"

View File

@ -19,6 +19,7 @@ import com.github.libretube.helpers.PreferenceHelper
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import kotlinx.serialization.decodeFromString import kotlinx.serialization.decodeFromString
import retrofit2.HttpException import retrofit2.HttpException
@ -97,7 +98,9 @@ class LoginDialog(
PreferenceHelper.setToken(response.token) PreferenceHelper.setToken(response.token)
PreferenceHelper.setUsername(login.username) PreferenceHelper.setUsername(login.username)
onLogin.invoke() withContext(Dispatchers.Main) {
onLogin.invoke()
}
dialog?.dismiss() dialog?.dismiss()
} }
} }