From e35274d3a110c78bbe7ec4713bf361275a194937 Mon Sep 17 00:00:00 2001 From: QQ Date: Tue, 17 Nov 2026 08:30:27 +0800 Subject: [PATCH] Import apps/android/src/services/bot-room-rows.ts --- apps/android/src/services/bot-room-rows.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/android/src/services/bot-room-rows.ts b/apps/android/src/services/bot-room-rows.ts index 285b595..089b17b 100644 --- a/apps/android/src/services/bot-room-rows.ts +++ b/apps/android/src/services/bot-room-rows.ts @@ -66,12 +66,12 @@ export const ROOM_ROWS_LEGACY_INTERVAL_MS = 2000 export const ROOM_ROWS_LEGACY_MISSES = 2 /** - * Which rows a ledger line draws. The live snapshot wins only while it holds replies: - * a list captured just as the round opened is empty and knows nothing the rows fetched - * for the settled round do not, so letting it win hid the members' replies. + * A successful Host read is authoritative, including an empty result. The cached + * live snapshot may contain only the first member's reply from an earlier poll. + * Keep that snapshot only until the current round has been read successfully. */ -export function preferredRoomRows(live: BotObject[] | undefined, fetched: BotObject[]): BotObject[] { - return live !== undefined && live.length > 0 ? live : fetched +export function preferredRoomRows(live: BotObject[] | undefined, fetched: BotObject[] | undefined): BotObject[] { + return fetched ?? live ?? [] } function isObject(value: unknown): value is BotObject {