Skip to content

Commit

Permalink
(Info) Make selection listener optional #50
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkeppeler committed Jun 12, 2023
1 parent 87182bc commit 37876ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion info/src/main/java/com/maxkeppeler/sheets/info/InfoView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fun InfoView(
orientation = orientation,
selection = selection,
onNegative = { selection.onNegativeClick?.invoke() },
onPositive = selection.onPositiveClick::invoke,
onPositive = { selection.onPositiveClick?.invoke() },
state = useCaseState,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ class InfoSelection(
override val negativeButton: SelectionButton? = BaseConstants.DEFAULT_NEGATIVE_BUTTON,
override val onNegativeClick: (() -> Unit)? = null,
override val positiveButton: SelectionButton = BaseConstants.DEFAULT_POSITIVE_BUTTON,
val onPositiveClick: () -> Unit,
val onPositiveClick: (() -> Unit) ?= null
) : BaseSelection()

0 comments on commit 37876ba

Please sign in to comment.