feat: Enhance updateConvoInAllQueries to support moving conversations to the top

This commit is contained in:
Danny Avila 2025-12-18 09:23:02 -05:00
parent c7bc5548bc
commit 4c115b684c
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
3 changed files with 134 additions and 10 deletions

View file

@ -310,7 +310,7 @@ export default function useEventHandlers({
if (requestMessage.parentMessageId === Constants.NO_PARENT) {
addConvoToAllQueries(queryClient, update);
} else {
updateConvoInAllQueries(queryClient, update.conversationId!, (_c) => update);
updateConvoInAllQueries(queryClient, update.conversationId!, (_c) => update, true);
}
} else if (setConversation) {
setConversation((prevState) => {
@ -385,7 +385,7 @@ export default function useEventHandlers({
if (parentMessageId === Constants.NO_PARENT) {
addConvoToAllQueries(queryClient, update);
} else {
updateConvoInAllQueries(queryClient, update.conversationId!, (_c) => update);
updateConvoInAllQueries(queryClient, update.conversationId!, (_c) => update, true);
}
}
} else if (setConversation) {