https://kotlinlang.org logo
#coroutines
Title
# coroutines
s

Slackbot

04/03/2019, 1:34 PM
This message was deleted.
l

leosan

04/03/2019, 1:40 PM
not sure if I got it right but instead of
if (mappingJob != null) mappingJob?.cancel()
you can do something like
if (mappingJob?.isActive == true) mappingJob?.cancel()
is something like that?
👍 1
c

chi

04/03/2019, 1:46 PM
Thanks @leosan, that works (not like fixing the problem I currently have), just wanted to cancel irrespective of the active condition.
3 Views