From 058335d5e1b97d95eb47868435b3b77c8f68b6b1 Mon Sep 17 00:00:00 2001 From: Diogo Date: Tue, 8 Oct 2024 10:23:03 +0100 Subject: [PATCH] initial chat items --- docs/rfcs/2024-10-07-chat-infinite-scrolling.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/rfcs/2024-10-07-chat-infinite-scrolling.md b/docs/rfcs/2024-10-07-chat-infinite-scrolling.md index 9d44dd7f90..4298679204 100644 --- a/docs/rfcs/2024-10-07-chat-infinite-scrolling.md +++ b/docs/rfcs/2024-10-07-chat-infinite-scrolling.md @@ -38,6 +38,15 @@ fetchLatest() fetchLast() ``` + +```haskell +-- Chat command +APIGetInitialChatItems ChatRef + +-- Chat result +CRInitialChatItems {user :: User, latestChatItems :: [AChatItem], unreadChatItems :: [AChatItem]} +``` + ### Option 1 Keep single instance of `chatItems` representing the current scrollable chat area. The entire array is cleared and replaced during long-distance navigation, and items are appended or prepended as needed during scroll.