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