Made account devices remove button clickable

This commit is contained in:
Sylvain Berfini 2023-09-27 14:31:26 +02:00
parent 1c72196943
commit 9fcdb2bffa
2 changed files with 8 additions and 1 deletions

View file

@ -26,4 +26,9 @@ class AccountDeviceModel @WorkerThread constructor(
val lastConnectionDate: String,
val lastConnectionTime: String,
private val onRemove: () -> (Unit)
)
) {
fun removeDevice() {
onRemove()
}
}

View file

@ -24,6 +24,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="23dp"
android:layout_marginTop="34dp"
android:layout_marginEnd="5dp"
android:text="@{model.name, default=`Pixel 6 Pro`}"
android:maxLines="1"
android:ellipsize="end"
@ -34,6 +35,7 @@
<androidx.appcompat.widget.AppCompatTextView
style="@style/tertiary_button_label_style"
android:id="@+id/remove"
android:onClick="@{() -> model.removeDevice()}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="17dp"