Merge pull request #617 from Bnyro/master

hide password
This commit is contained in:
Bnyro 2022-06-25 18:32:11 +02:00 committed by GitHub
commit 75dcaea903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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>