fix(splash): select the latest history message

This commit is contained in:
2026-07-13 18:16:25 +08:00
parent d8cd05b228
commit 328c4c8127
2 changed files with 42 additions and 1 deletions
+1 -1
View File
@@ -11,6 +11,6 @@ export async function fetchSplashLatestMessagePreview(): Promise<
const result = await getChatRepository().getHistory(1, 0);
if (Result.isErr(result)) return Result.err(result.error);
const latestMessage = result.data.messages[1] ?? null;
const latestMessage = result.data.messages.at(-1) ?? null;
return Result.ok(getSplashLatestMessagePreview(latestMessage));
}