From fb2dc744209c0d29e56c57016eca6b66e6f1d385 Mon Sep 17 00:00:00 2001 From: Diogo Date: Mon, 7 Oct 2024 22:08:14 +0100 Subject: [PATCH] clarification --- docs/rfcs/2024-10-07-chat-infinite-scrolling.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/rfcs/2024-10-07-chat-infinite-scrolling.md b/docs/rfcs/2024-10-07-chat-infinite-scrolling.md index a3840ab7f4..6bdd03cf95 100644 --- a/docs/rfcs/2024-10-07-chat-infinite-scrolling.md +++ b/docs/rfcs/2024-10-07-chat-infinite-scrolling.md @@ -166,7 +166,7 @@ else - Deduplication of items as they are fetched becomes of extreme importance as not doing it effectively can lead to duplicated messages being displayed. ### Option 3 -N sections each with it's own instance of `chatItems` representing all previously fetched scrollable chat areas. Long distance navigation creates new anchors in cases date wasn't yet fetched. Sections are merged in cases where 2 section intercept. +N sections each with it's own instance of `chatItems` representing all previously fetched scrollable chat areas. Long distance navigation creates new anchors in cases date wasn't yet fetched. Sections are merged in cases where 2 sections intercept. #### Data structures @@ -259,6 +259,7 @@ scrollAnchors = Array // Will take o(n) space where n is the number of items loaded, It will make dedup, merge and intersection operations o(1), that is probably a acceptable tradeoff as we want to minimize execution speed while scrolling. chatIdAnchor = Map chatItems = Array +scrollableItems = chatItems(slice based on active anchor) activeAnchorIndex = Int ```