Skip to content

Commit

Permalink
Merge pull request #4603 from vector-im/feature/aris/remove_not_neede…
Browse files Browse the repository at this point in the history
…d_job_cancel_4602

There is no need to call job.cancel() when we are using viewModelScope()
  • Loading branch information
bmarty authored Dec 1, 2021
2 parents f800696 + 578a012 commit fa256cc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions changelog.d/4602.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
There is no need to call job.cancel() when we are using viewModelScope()
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,4 @@ class SearchViewModel @AssistedInject constructor(
)
}
}

override fun onCleared() {
currentTask?.cancel()
super.onCleared()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,4 @@ class RoomDirectoryViewModel @AssistedInject constructor(
}
}
}

override fun onCleared() {
currentJob?.cancel()
super.onCleared()
}
}

0 comments on commit fa256cc

Please sign in to comment.