Skip to content

Commit

Permalink
Update arrow visibility logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ertugrulkaragoz1 committed Sep 19, 2023
1 parent 2e592b0 commit 8770caa
Showing 1 changed file with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,29 @@ internal data class TooltipViewState(
fun getArrowResource() =
if (showcaseModel.arrowResource == Constants.DEFAULT_ARROW_RESOURCE) R.drawable.ic_showcase_arrow_up else showcaseModel.arrowResource

fun getTopArrowVisibility() = if (arrowPosition == AbsoluteArrowPosition.UP) View.VISIBLE else View.GONE
fun getTopArrowVisibility(): Int {
if (showcaseModel.isArrowVisible.not()) {
return View.GONE
}

return if (arrowPosition == AbsoluteArrowPosition.UP) {
View.VISIBLE
} else {
View.GONE
}
}

fun getBottomArrowVisibility() = if (arrowPosition == AbsoluteArrowPosition.DOWN) View.VISIBLE else View.GONE
fun getBottomArrowVisibility(): Int {
if (showcaseModel.isArrowVisible.not()) {
return View.GONE
}

return if (arrowPosition == AbsoluteArrowPosition.DOWN) {
View.VISIBLE
} else {
View.GONE
}
}

fun getCloseButtonColor() = showcaseModel.closeButtonColor

Expand Down

0 comments on commit 8770caa

Please sign in to comment.