Skip to content

Commit

Permalink
Fix handling of multiple buttons with different visibility in the sam…
Browse files Browse the repository at this point in the history
…e spot (#3784)

Signed-off-by: Jimmy Tanagra <[email protected]>
  • Loading branch information
jimtng authored Jul 30, 2024
1 parent fd8692b commit 69ffbcb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,9 @@ class WidgetAdapter(
}

// Rows and columns start with 1 in Sitemap definition, thus decrement them here
val button = buttons.firstOrNull { (it.row ?: 0) - 1 == row && (it.column ?: 0) - 1 == column }
val button = buttons
.filter { it.visibility == true }
.firstOrNull { (it.row ?: 0) - 1 == row && (it.column ?: 0) - 1 == column }
if (button != null && button.visibility) {
buttonView.tag = button
buttonView.setOnClickListener(this)
Expand Down

0 comments on commit 69ffbcb

Please sign in to comment.