in other words I want to check two conditions insi...
# getting-started
i
in other words I want to check two conditions inside the when statement
k
Something like
Copy code
when(a to b) {
    true to false -> ...
    false to true -> ...
}
Basically creating temporary `Pair`s and checking those for equality.
i
do not get I have a notification Object from the server that gives me back two strings
Copy code
when (Pair(notification.module!!, notification.action!!)) {
            Pair("01", NotificationAction.ASSESS) -> showInvoiceBy(notification)
            Pair("03", NotificationAction.ASSESS) -> showOrderBy(notification)
            //TODO: next tickets
            else -> {

            }
        }
k
Yeah, that's it.
i
does not work
k
Well, what's the error? Can you post a full sample that reproduces this?
i
I am testing
Screenshot 2019-03-20 at 15.21.23.png
Now works!
thank you @karelpeeters
👍 1