diff --git a/vector/src/main/java/im/vector/riotx/features/roomdirectory/RoomDirectoryViewModel.kt b/vector/src/main/java/im/vector/riotx/features/roomdirectory/RoomDirectoryViewModel.kt index 89af5330ca..456ea23834 100644 --- a/vector/src/main/java/im/vector/riotx/features/roomdirectory/RoomDirectoryViewModel.kt +++ b/vector/src/main/java/im/vector/riotx/features/roomdirectory/RoomDirectoryViewModel.kt @@ -226,4 +226,9 @@ class RoomDirectoryViewModel @AssistedInject constructor(@Assisted initialState: }) } + override fun onCleared() { + super.onCleared() + + currentTask?.cancel() + } } \ No newline at end of file