feat: Add passkey icon in entry list #1421

This commit is contained in:
J-Jamet
2025-08-22 11:45:59 +02:00
parent 9477fba704
commit 32d6a11353
2 changed files with 15 additions and 1 deletions

View File

@@ -418,6 +418,7 @@ class NodesAdapter (
}
}
// OTP
val otpElement = entry.getOtpElement()
holder.otpContainer?.removeCallbacks(holder.otpRunnable)
if (otpElement != null
@@ -440,6 +441,10 @@ class NodesAdapter (
holder.attachmentIcon?.visibility =
if (entry.containsAttachment()) View.VISIBLE else View.GONE
// Passkey
holder.passkeyIcon?.visibility =
if (entry.getPasskey() != null) View.VISIBLE else View.GONE
// Assign colors
assignBackgroundColor(holder.container, entry)
assignBackgroundColor(holder.otpContainer, entry)
@@ -612,6 +617,7 @@ class NodesAdapter (
var otpRunnable: OtpRunnable = OtpRunnable(otpContainer)
var numberChildren: TextView? = itemView.findViewById(R.id.node_child_numbers)
var attachmentIcon: ImageView? = itemView.findViewById(R.id.node_attachment_icon)
var passkeyIcon: ImageView? = itemView.findViewById(R.id.node_passkey_icon)
}
companion object {

View File

@@ -159,6 +159,14 @@
android:layout_gravity="center"
android:src="@drawable/ic_attach_file_white_24dp" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/node_passkey_icon"
style="@style/KeepassDXStyle.Icon.Entry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_passkey_white_24dp" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatTextView