Merge pull request #4603 from vector-im/feature/aris/remove_not_needed_job_cancel_4602

There is no need to call job.cancel() when we are using viewModelScope()
This commit is contained in:
Benoit Marty 2021-12-01 18:24:06 +01:00 committed by GitHub
commit fa256cca25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 10 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

@ -141,9 +141,4 @@ class SearchViewModel @AssistedInject constructor(
)
}
}
override fun onCleared() {
currentTask?.cancel()
super.onCleared()
}
}

View file

@ -231,9 +231,4 @@ class RoomDirectoryViewModel @AssistedInject constructor(
}
}
}
override fun onCleared() {
currentJob?.cancel()
super.onCleared()
}
}