From 3fae491d1065e79320300545cecc037ffc657c6a Mon Sep 17 00:00:00 2001 From: Paul Hitt Date: Sat, 12 Sep 2026 12:30:02 -0400 Subject: [PATCH] A poll shows the moment the group opens Opening a group built the chat without its polls, so one waiting on your vote was blank until the next poll tick came round, up to five seconds later. A poll waiting on your vote is often the reason somebody opened the group. Co-Authored-By: Claude Opus 5 --- .../kotlin/io/flamenet/messenger/app/MessengerViewModel.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/kotlin/io/flamenet/messenger/app/MessengerViewModel.kt b/app/src/main/kotlin/io/flamenet/messenger/app/MessengerViewModel.kt index 904a687..3e3d8fa 100644 --- a/app/src/main/kotlin/io/flamenet/messenger/app/MessengerViewModel.kt +++ b/app/src/main/kotlin/io/flamenet/messenger/app/MessengerViewModel.kt @@ -894,6 +894,13 @@ class MessengerViewModel( current.history(thread), group = group, pinnedMessageId = current.pinnedMessage(thread), + // Read here, not left to the next poll tick. A poll + // waiting on your vote is the reason you opened the + // group, and it was blank for the first few seconds. + polls = + current.conversations.polls + .pollsIn(group.id) + .sortedBy { p -> p.id }, ), unread = it.unread - thread, ) -- 2.54.0