mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 13:50:30 +05:30
commit
75dcaea903
@ -63,6 +63,7 @@ class DeleteAccountDialog : DialogFragment() {
|
||||
RetrofitInstance.api.deleteAccount(token, DeleteUserRequest(password))
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
return@launchWhenCreated
|
||||
}
|
||||
Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()
|
||||
logout()
|
||||
|
@ -155,6 +155,7 @@ class InstanceSettings : PreferenceFragmentCompat() {
|
||||
}
|
||||
|
||||
val deleteAccount = findPreference<Preference>("delete_account")
|
||||
deleteAccount?.parent?.removePreference(deleteAccount)
|
||||
deleteAccount?.setOnPreferenceClickListener {
|
||||
if (token != "") {
|
||||
val newFragment = DeleteAccountDialog()
|
||||
|
@ -20,7 +20,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/password"
|
||||
android:inputType="text"
|
||||
android:inputType="textPassword"
|
||||
android:padding="12dp" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user