hide password

This commit is contained in:
Bnyro 2022-06-25 18:30:17 +02:00
parent cbe70b3032
commit 8062873ca2
3 changed files with 3 additions and 1 deletions

View File

@ -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()

View File

@ -155,6 +155,7 @@ class InstanceSettings : PreferenceFragmentCompat() {
}
val deleteAccount = findPreference<Preference>("delete_account")
deleteAccount?.parent?.removePreference(deleteAccount)
deleteAccount?.setOnPreferenceClickListener {
if (token != "") {
val newFragment = DeleteAccountDialog()

View File

@ -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>