There is no need to call job.cancel() when we are using viewModelScope()

This commit is contained in:
ariskotsomitopoulos 2021-12-01 13:15:03 +00:00
parent 2e52f429fb
commit 9f1e327fa5
3 changed files with 1 additions and 2 deletions

1
changelog.d/4602.misc Normal file
View file

@ -0,0 +1 @@
There is no need to call job.cancel() when we are using viewModelScope()

View file

@ -143,7 +143,6 @@ class SearchViewModel @AssistedInject constructor(
}
override fun onCleared() {
currentTask?.cancel()
super.onCleared()
}
}

View file

@ -233,7 +233,6 @@ class RoomDirectoryViewModel @AssistedInject constructor(
}
override fun onCleared() {
currentJob?.cancel()
super.onCleared()
}
}