Skip to content

Commit

Permalink
Deduplicator: Clicking the footer in the grid display opens the detai…
Browse files Browse the repository at this point in the history
…ls directly
  • Loading branch information
d4rken committed Nov 8, 2023
1 parent b3e2c45 commit 49ae7b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ class DeduplicatorListGridVH(parent: ViewGroup) :
matchTypeChecksum.isVisible = item.cluster.types.contains(Duplicate.Type.CHECKSUM)
matchTypePhash.isVisible = item.cluster.types.contains(Duplicate.Type.PHASH)

footerContainer.setOnClickListener { item.onFooterClicked(item) }
root.setOnClickListener { item.onItemClicked(item) }
}

data class Item(
override val cluster: Duplicate.Cluster,
val onItemClicked: (Item) -> Unit,
val onFooterClicked: (Item) -> Unit,
) : DeduplicatorListAdapter.Item {

override val itemSelectionKey: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class DeduplicatorListViewModel @Inject constructor(
DeduplicatorListGridVH.Item(
cluster = cluster,
onItemClicked = { delete(setOf(it)) },
onFooterClicked = { showDetails(it) }
)
}
State(rows, progress)
Expand Down

0 comments on commit 49ae7b9

Please sign in to comment.