Merge pull request #5228 from Bnyro/master

fix: crash when deleting account
This commit is contained in:
Bnyro 2023-11-27 19:51:27 +01:00 committed by GitHub
commit da0f97a27b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ class DeleteAccountDialog : DialogFragment() {
} }
} }
private fun deleteAccount(password: String) = lifecycleScope.launch { private suspend fun deleteAccount(password: String) {
val token = PreferenceHelper.getToken() val token = PreferenceHelper.getToken()
try { try {
@ -59,7 +59,7 @@ class DeleteAccountDialog : DialogFragment() {
} catch (e: Exception) { } catch (e: Exception) {
Log.e(TAG(), e.toString()) Log.e(TAG(), e.toString())
Toast.makeText(context, R.string.unknown_error, Toast.LENGTH_SHORT).show() Toast.makeText(context, R.string.unknown_error, Toast.LENGTH_SHORT).show()
return@launch return
} }
Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show() Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()