fix: crash when deleting account

This commit is contained in:
Bnyro 2023-11-27 19:51:04 +01:00
parent 10f32e37a9
commit 10e3db8d45

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()
try {
@ -59,7 +59,7 @@ class DeleteAccountDialog : DialogFragment() {
} catch (e: Exception) {
Log.e(TAG(), e.toString())
Toast.makeText(context, R.string.unknown_error, Toast.LENGTH_SHORT).show()
return@launch
return
}
Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()