From 88d1f75d1db8e6736cfbf71417925b8720fb80d5 Mon Sep 17 00:00:00 2001 From: Maxime NATUREL <46314705+mnaturel@users.noreply.github.com> Date: Fri, 13 Jan 2023 10:57:41 +0100 Subject: [PATCH] Improve fake mechanism of syncing --- .../roomprofile/polls/list/data/RoomPollDataSource.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/polls/list/data/RoomPollDataSource.kt b/vector/src/main/java/im/vector/app/features/roomprofile/polls/list/data/RoomPollDataSource.kt index d6d9010704..c0efb1efa1 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/polls/list/data/RoomPollDataSource.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/polls/list/data/RoomPollDataSource.kt @@ -163,6 +163,12 @@ class RoomPollDataSource @Inject constructor() { Timber.d("roomId=$roomId") // TODO // unmock using SDK service + add unit tests - delay(3000) + if (fakeLoadCounter == 0) { + // fake first load + loadMorePolls(roomId) + } else { + // fake sync + delay(3000) + } } }