Open rishabh876 opened 5 years ago
is showError()
interacting with the view?
If yes, why would you move showError()
outside of the ifViewAttached { ... }
block?
This is actually just a simplified logic to show how it can help. I don't use it this way but I prefer writing only view's function inside ifViewAttached
and rest outside. Otherwise things look nested for no reason.
Hi, this is just a feature request that will make code a bit cleaner and easier to write.
let's say we have
This will become
here
ifViewAttached
returned the value returned by functiongetStringFromId
. This works very similar to let function in Kotlin.