Skip to content

Instantly share code, notes, and snippets.

@balsikandar
Last active May 28, 2021 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balsikandar/236eaae8f678db351fb26687df07fd39 to your computer and use it in GitHub Desktop.
Save balsikandar/236eaae8f678db351fb26687df07fd39 to your computer and use it in GitHub Desktop.
if (pickupSelected && dropSelected) return gotoNextPage()
var msg: String? = "Please select pickup location"
if (selectedTab === "PICKUP_POINT" && pickupSelected) {
goToDrop()
msg = null
}
msg = msg ?: "Please select drop location"
if (selectedTab === "DROP_POINT" && dropSelected) {
goToPickup()
msg = null
}
msg.let { toast(it) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment