feat(message): implement incremental sync and atomic unread updates
Refactor the messaging system to improve synchronization efficiency and state consistency. - Implement incremental message synchronization using sequence numbers (seq) to reduce payload size. - Add `markAllAsRead` batch API support to optimize read receipt processing. - Introduce atomic state updates in `useMessageStore` to prevent inconsistent UI rendering during unread count changes. - Implement notification deduplication in `WSMessageHandler` to prevent duplicate unread increments during reconnection. - Optimize `MessageSyncService` to prioritize incremental sync over full snapshots when local data exists. - Refactor `ReadReceiptManager` to use optimistic updates with proper rollback mechanisms. - Fix minor UI issues in `SettingsScreen` and `PrivacySettingsScreen` related to theme picker z-index and style application.
This commit is contained in:
@@ -333,7 +333,7 @@ export const PrivacySettingsScreen: React.FC = () => {
|
||||
variant="body"
|
||||
style={[
|
||||
styles.dropdownOptionText,
|
||||
isActive && styles.dropdownOptionTextActive,
|
||||
...(isActive ? [styles.dropdownOptionTextActive] : []),
|
||||
]}
|
||||
>
|
||||
{option.label}
|
||||
|
||||
@@ -408,7 +408,7 @@ export const SettingsScreen: React.FC = () => {
|
||||
<View
|
||||
key={group.title}
|
||||
style={[
|
||||
{ overflow: 'visible', zIndex: group.items.some((i) => i.isThemePicker && openPicker === 'theme') ? 10 : groupIndex },
|
||||
{ overflow: 'visible', zIndex: group.items.some((i) => 'isThemePicker' in i && i.isThemePicker && openPicker === 'theme') ? 10 : groupIndex },
|
||||
]}
|
||||
>
|
||||
<View style={styles.groupHeader}>
|
||||
|
||||
Reference in New Issue
Block a user