lenqnr
07/05/2019, 12:13 PMDialogFragment that calls a `ViewModel`'s method, and the method calls a suspending method via viewModelScope.launch. The problem is, when I click OK button on the dialog, I get kotlinx.coroutines.JobCancellationException: Job was cancelled error message and the suspending method doesn't work. How can I overcome this problem? I moved the method to my MainViewModel and accessed it with sharedViewModel, but still the same JobCancellationException occured.rkeazor
07/05/2019, 12:21 PMrkeazor
07/05/2019, 12:23 PMlenqnr
07/05/2019, 12:33 PMlenqnr
07/05/2019, 12:36 PMfun doSomething() = viewModelScope.launch {
<http://httpClient.post|httpClient.post><Unit>("<http://example.com>")
}rkeazor
07/05/2019, 12:45 PMrkeazor
07/05/2019, 12:45 PMrkeazor
07/05/2019, 12:46 PMlenqnr
07/05/2019, 12:50 PMlenqnr
07/05/2019, 12:51 PMlenqnr
07/06/2019, 6:26 AM