Phase 7: add reaction-only chat list notifications#1235
Merged
Conversation
…eactions - Introduced functions to retrieve stored reaction emojis and timestamps, enhancing the management of user reactions. - Updated the `applyIncomingReaction` function to accommodate optional timestamps for reactions. - Refactored the chat modal to utilize the new emoji retrieval logic, improving clarity and consistency in reaction displays. - Enhanced the `rebuildChatReactionPreview` function to ensure accurate representation of the latest reactions in chat.
…larity - Updated the logic for determining the latest activity timestamp in chat reactions, ensuring accurate representation of user interactions. - Simplified the handling of reaction previews by removing unnecessary action checks and enhancing the clarity of reaction text generation. - Improved the `clearChatReactionPreview` function to manage timestamps more effectively, ensuring proper updates to chat states. - Enhanced overall readability and maintainability of the chat reaction handling code.
- Simplified the logic for reading and managing stored reactions, enhancing the clarity of reaction data retrieval. - Updated the `syncChatReactionPreview` and `rebuildChatReactionPreview` functions to streamline the process of updating chat reaction previews. - Improved the handling of reaction timestamps and emoji retrieval, ensuring more accurate representation of user interactions. - Enhanced overall readability and maintainability of the chat reaction handling code.
…agement - Removed the `readStoredReaction` function to simplify reaction data retrieval, directly accessing reaction properties. - Updated the `syncChatReactionPreview` function to compute the latest reaction state from message data, enhancing accuracy. - Improved handling of emoji trimming and timestamp management across various functions, ensuring consistent representation of user interactions. - Enhanced overall code clarity and maintainability in chat reaction processing.
… code clarity and maintainability. This cleanup enhances the overall readability of the `app.js` file by eliminating unnecessary explanations that are no longer relevant to the current implementation.
- Introduced comprehensive documentation for several functions related to chat reactions, including `applyIncomingReaction`, `getReactionTargetPreviewText`, `syncChatReactionPreview`, `getContactTotalUnread`, and `syncChatTabNotificationBubble`. - Enhanced code clarity and maintainability by providing clear descriptions of function purposes and parameters, aiding future development and understanding of the chat reaction system.
…saction timestamp. This change ensures that the correct sent timestamp is used for both adding and removing reactions, enhancing the accuracy of reaction state updates.
- Updated the `getReactionTargetPreviewText` function to include a case for messages of type 'call', returning 'call' as the preview text. - Removed redundant 'call' handling logic from the previous position in the function to streamline the code. - Cleaned up comments in the `processChats` function to enhance clarity regarding notification handling for unread reactions.
- Simplified the handling of existing chats by using a single variable to manage chat updates. - Enhanced timestamp management for chat updates, ensuring the latest message timestamp is accurately reflected. - Cleaned up the logic for inserting chats to maintain proper order based on timestamps, improving overall clarity and maintainability of the chat processing code.
- Introduced a one-time migration to ensure all stored contacts have a reaction array, enhancing data consistency. - Refactored the `applyIncomingReaction` function to work with the new contact-level reactions structure. - Updated related functions to utilize the new reaction management system, improving clarity and maintainability of the code. - Enhanced the handling of reactions in chat processing, ensuring accurate updates and representation of user interactions.
- Added a flag to indicate changes in the reaction preview when a message is deleted, improving the accuracy of UI updates. - Enhanced the logic for refreshing the upcoming calls UI based on deleted call messages, ensuring timely updates for users.
- Added logic to accurately count and adjust unread reaction notifications when a message is deleted, improving user experience in active chats. - Updated the handling of contact reactions to ensure proper synchronization of reaction previews, enhancing the clarity of chat interactions.
- Updated the handling of chat reaction previews to ensure the latest valid reaction activity is displayed, enhancing user experience in chats. - Simplified the logic for determining when to show reaction previews, improving clarity and maintainability of the code. - Enhanced timestamp management for chat updates, ensuring accurate representation of the latest interactions.
- Adjusted the calculation of the latest item timestamp to prioritize the reaction preview timestamp when applicable, improving the accuracy of chat updates. - Enhanced the clarity of the logic determining when to display the latest reaction activity, contributing to a better user experience in chats.
… clarity - Updated the function name to better reflect its purpose of synchronizing the latest activity timestamp in chat interactions. - Adjusted all references to the renamed function throughout the codebase to maintain consistency and improve code readability.
…arrays - Removed the one-time migration function for ensuring stored contacts have a reaction array, simplifying the codebase. - Updated reaction handling to ensure proper checks for reaction arrays, enhancing robustness in chat interactions. - Improved clarity in the logic for filtering and applying reactions, ensuring accurate updates in chat previews and interactions.
- Updated the payload assignment in the reaction handling logic to improve clarity and ensure the correct timestamp is used for reactions. - Enhanced the destructuring of variables from the asynchronous function to streamline the code and maintain consistency in chat updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Issue #1232 asks for reaction-only incoming updates to behave like edit-only updates for unread and chat-list notifications.
Impact
Users see reaction activity reflected in unread counts, the chats-tab notification dot, and chat-list ordering even when no new chat bubble is created.
Root Cause
Reaction control messages previously updated message reaction chips, but they did not fully participate in the chat-list unread/notification bookkeeping path.
Validation
mainCloses #1232