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()
}
}