mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fix refreshing after login
This commit is contained in:
parent
499be1e1cb
commit
18a8ec2e3f
@ -54,13 +54,10 @@ class DeleteAccountDialog : DialogFragment() {
|
|||||||
return@launchWhenCreated
|
return@launchWhenCreated
|
||||||
}
|
}
|
||||||
Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()
|
Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()
|
||||||
logout()
|
|
||||||
val restartDialog = RequireRestartDialog()
|
|
||||||
restartDialog.show(childFragmentManager, RequireRestartDialog::class.java.name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun logout() {
|
|
||||||
PreferenceHelper.setToken("")
|
PreferenceHelper.setToken("")
|
||||||
|
activity?.recreate()
|
||||||
|
dialog?.dismiss()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,8 +79,9 @@ class LoginDialog : DialogFragment() {
|
|||||||
Toast.makeText(context, R.string.loggedIn, Toast.LENGTH_SHORT).show()
|
Toast.makeText(context, R.string.loggedIn, Toast.LENGTH_SHORT).show()
|
||||||
PreferenceHelper.setToken(response.token!!)
|
PreferenceHelper.setToken(response.token!!)
|
||||||
PreferenceHelper.setUsername(login.username!!)
|
PreferenceHelper.setUsername(login.username!!)
|
||||||
dialog?.dismiss()
|
|
||||||
activity?.recreate()
|
activity?.recreate()
|
||||||
|
dialog?.dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user