You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have an issue where pagination methods (GetNewerActions, GetOlderActions) are called unconditionally even if we should know that no newer or older messages are available.
Solution
To improve this OpenReport, GetNewerActions, GetOlderActions should all return pagination info. This should be stored in the REPORT_METADATA onyx collection.
For OpenReport it should be hasNewerActions and hasOlderActions.
For GetNewerActions it should be hasNewerActions.
For GetOlderActions it should be hasOlderActions.
Then in loadNewerChats and loadOlderChats we should check that newer / older actions are available before loading them.
This will reduce the call to these methods significantly. For regular chats we never should have newer actions since we start loading from the start of the chat so GetNewerActions will never be called. If we are in a short chat, we probably loaded all messages initially so we don't need to call GetOlderActions. For comment linking we should still call both GetNewerActions and GetOlderActions since we are probably in the middle of a chat.
The text was updated successfully, but these errors were encountered:
Problem
We currently have an issue where pagination methods (
GetNewerActions
,GetOlderActions
) are called unconditionally even if we should know that no newer or older messages are available.Solution
To improve this
OpenReport
,GetNewerActions
,GetOlderActions
should all return pagination info. This should be stored in theREPORT_METADATA
onyx collection.OpenReport
it should behasNewerActions
andhasOlderActions
.GetNewerActions
it should behasNewerActions
.GetOlderActions
it should behasOlderActions
.Then in
loadNewerChats
andloadOlderChats
we should check that newer / older actions are available before loading them.This will reduce the call to these methods significantly. For regular chats we never should have newer actions since we start loading from the start of the chat so
GetNewerActions
will never be called. If we are in a short chat, we probably loaded all messages initially so we don't need to callGetOlderActions
. For comment linking we should still call bothGetNewerActions
andGetOlderActions
since we are probably in the middle of a chat.The text was updated successfully, but these errors were encountered: