From c7f44b49ae715d5b0ae24b5619ab5491e3e81967 Mon Sep 17 00:00:00 2001 From: Tlaster Date: Fri, 24 Apr 2020 14:43:51 +0800 Subject: [PATCH] Fix #1272 --- .../twidere/loader/statuses/ConversationLoader.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/loader/statuses/ConversationLoader.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/loader/statuses/ConversationLoader.kt index d97f906dc..b95c2eb9a 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/loader/statuses/ConversationLoader.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/loader/statuses/ConversationLoader.kt @@ -152,6 +152,14 @@ class ConversationLoader( } if (loadReplies || noSinceMaxId || sinceId != null && sinceSortId > status.sort_id) { // Load replies + try { + if (details.type == AccountType.TWITTER) { + // try to load thread + statuses.addAll(loadTwitterWebReplies(details, twitter)) + } + } catch (e: MicroBlogException) { + // Ignore + } val query = SearchQuery() query.count(100) if (details.type == AccountType.TWITTER) { @@ -171,7 +179,7 @@ class ConversationLoader( // Ignore for now } } - return statuses.mapTo(PaginatedArrayList()) { + return statuses.distinctBy { it.id }.mapTo(PaginatedArrayList()) { it.toParcelable(details, profileImageSize) }.apply { this.nextPage = nextPagination