mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fix: crash when deleting account
This commit is contained in:
parent
10f32e37a9
commit
10e3db8d45
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user