- Update `withJPush` plugin to support Expo SDK 56+ by using `JPUSHService.setup` instead of `JCoreModule.setup` and adding `UNUserNotificationCenterDelegate` conformance.
- Improve `SmartImage` component by adding a ref to prevent loading state flickering when transitioning from preview to original image.
- Upgrade `@shopify/flash-list` dependency.
- Add transition prop to `SmartImage` for smoother image loading.
The CI workflow overwrites build.gradle/settings.gradle with China Maven
mirrors but was missing the Huawei AGConnect classpath dependency and
Maven repo, causing "Plugin with id 'com.huawei.agconnect' not found".
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Migrate from @react-navigation/native to expo-router navigation hooks across all screens.
Add polyfills module and apply LiveKit VideoView optional loading for Expo Go compatibility.
Improve background sync to skip when user is not logged in.
Enhance fetchUnreadCount to return typed totalUnread and systemUnread values.
Replace the custom WebRTC implementation with LiveKit for improved
stability and feature support.
- Remove `react-native-webrtc` and custom `WebRTCManager`
- Implement `LiveKitService` for room and track management
- Update `callStore` to handle LiveKit events and connection states
- Refactor `CallScreen` (mobile and web) to use `@livekit/react-native`
and `VideoView`
- Update WebSocket protocol to use `call_ready` instead of manual SDP/ICE
exchanges
- Add necessary camera and microphone permissions to `app.json`
- Update Metro and Babel configurations for LiveKit compatibility
Integrate Huawei Maven repository and AGConnect plugin into settings.gradle using the withSettingsGradle helper. This ensures the necessary repositories and plugin management are correctly configured for Huawei Push services.
Implement `removeMessage` in `useMessageStore` to allow for atomic message deletion from the state. Improve `useChatScreen` loading logic to prevent layout jumps and ensure consistent UI state during initial message loading. Additionally, add type safety for WebSocket sequence numbers and optimize message selector stability.
- Add `removeMessage` action to `useMessageStore` for state-consistent deletions
- Refine `useChatScreen` loading state logic to prevent FlashList layout issues
- Ensure `useMessages` hook returns a stable `EMPTY_MESSAGES` constant
- Cast WebSocket `seq` to integer to ensure consistent numeric comparison
- Update `useChatScreen` to use `useMessageStore` for immediate local deletion feedback
Introduce `mergeMessages` and `patchMessages` to the message store to handle
updates atomically within Zustand's `set` callback. This replaces manual
read-modify-write patterns in services, preventing message loss during
concurrent WebSocket updates and synchronization processes.
- Add `mergeMessages` for atomic merging of new messages into existing lists
- Add `patchMessages` for efficient field updates (e.g., sender info, status)
- Update `MessageSendService`, `MessageSyncService`, and `WSMessageHandler`
to use these new atomic operations
- Remove reliance on external `mergeMessagesById` in service layers to
ensure state consistency
Optimize profile-related screens and components by implementing memoization and granular Zustand selectors to reduce unnecessary re-renders.
- **Performance Optimization**:
- Wrap `TabBar` in `React.memo` to prevent re-renders when parent components update.
- Refactor `UserProfileScreen` to use a memoized `ProfileListHeader` component, decoupling the user header from tab state changes.
- **State Management**:
- Replace object destructuring from `useAuthStore` with granular selectors (e.g., `useAuthStore((s) => s.logout)`) in `AccountDeletionScreen`, `EditProfileScreen`, `FollowListScreen`, and `SettingsScreen` to prevent re-renders on unrelated store changes.
- **Code Cleanup**:
- Remove redundant case logic in `useUserProfile` hook.
Improve application stability and performance by optimizing Zustand store usage, implementing memoization patterns, and introducing persistent authentication.
- **State Management**:
- Refactor Zustand selectors to use `useShallow` and `getState()` to prevent unnecessary re-renders and infinite loops in hooks.
- Implement `persist` middleware for `authStore` to maintain user sessions across restarts.
- Introduce `buildStateCached` in `themeStore` to reduce redundant theme object computations.
- **Performance & Rendering**:
- Implement `useMemo` for stable object/array references in `ImageGallery` and list components to prevent expensive re-renders.
- Replace inline arrow functions with `useCallback` in complex screens like `ChatScreen` and `MessageListScreen`.
- Optimize `FlashList` usage by providing stable `key` and `extraData` props.
- **Architecture**:
- Decouple unread count fetching by introducing `useUnreadCountQuery` (React Query) for better caching and synchronization.
- Add `useChannels` hook to centralize channel data fetching.
- Refine `SessionGate` logic to allow immediate rendering of authenticated users while verifying in the background.
Implement a more efficient conversation synchronization mechanism using
version numbers instead of sequence numbers to reduce bandwidth usage.
This includes adding support for Gzip decompression on WebSocket
messages to optimize data transfer.
- Add `pako` for WebSocket message decompression
- Implement `getSyncByVersion` in `MessageService`
- Implement `syncByVersion` in `MessageSyncService` to handle incremental
updates and conversation state changes
- Update `WebSocketService` to support binary frames and Gzip inflation
- Add `syncVersion` to `MessageStore` for tracking synchronization state
Add ability to search messages within a specific conversation. This includes:
- New `MessageSearchScreen` for displaying search results.
- `MessageRepository.searchByConversation` to query messages by keyword and conversation ID.
- Integration of search entry points in `GroupInfoScreen` and `PrivateChatInfoScreen`.
- Support for scrolling to a specific message sequence (`scrollToSeq`) when navigating from search results.
- Enhanced `HighlightText` component to support custom highlight styles.
feat(message): implement message search functionality
Pass group avatar through notification extras, navigation hrefs, and
route parameters. Update ChatScreen to resolve group information
(ID, name, and avatar) by prioritizing route parameters (e.g., from
push notifications) and falling back to conversation data from the
MessageManager.
- Update `NotificationBootstrap` to include `groupAvatar` in query params
- Update `hrefChat` to support `groupAvatar`
- Refactor `useChatScreen` to use `effectiveGroupId`, `effectiveGroupName`,
and `effectiveGroupAvatar`
- Ensure `MessageManager` fetches conversation details if missing when
activating a conversation
- Update `MessageListScreen` to pass `groupAvatar` during navigation
Refactor the message module to streamline state management by removing the `MessageStateManager` and `SubscriptionManager` layers, relying instead on Zustand's built-in selector mechanism for reactive updates.
- Remove redundant `setConversations`, `addMessage`, and `updateMessage` actions from the Zustand store to favor more specialized update methods.
- Clean up `MessageService` by removing deprecated conversation and message sending convenience methods.
- Update service interfaces to support new synchronization capabilities including `syncBySeq` and `restartSources`.
- Simplify documentation and comments across the message store and its associated services.
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.
Update app icons and splash assets to match new branding, changing the
adaptive icon background color from light blue (#E6F4FE) to brand blue
(#0570F9) across all Android icon variants.
Refactor the profile settings and privacy screens to provide a more
modern and intuitive user experience.
- Add icons to visibility options and privacy settings items
- Implement a theme selection dropdown in the settings screen
- Restructure privacy settings layout into grouped containers
- Move account management items (blocked users, deletion) from general
settings to privacy settings
- Improve visual hierarchy and spacing in settings screens
- Implement `segmentsToBlocks` utility to convert message segments into editable blocks.
- Update `BlockEditor` and `useBlockEditor` to support initial block loading and improved image upload handling.
- Add logic to `CreatePostScreen` to automatically switch to long-post mode when image segments are detected and preserve data when toggling modes.
- Update `AboutScreen` to make the ICP filing number clickable.
- Refactor mapper imports to use the updated data model paths.
Introduce a new `BlockEditor` component and upgrade the post/message
rendering system to support rich text segments (images, @mentions,
votes, and post references).
- Implement `BlockEditor` for long-form post creation with image
embedding support.
- Upgrade `PostContentRenderer` and `SegmentRenderer` to handle
complex segment types including inline images and block elements.
- Refactor `PostCard` to use segment-based content and image
signatures for optimized memoization.
- Centralize segment partitioning logic in `segmentUtils.ts` to ensure
consistent rendering across chat and post modules.
- Update `PostRepository` and `Post` entity to support the new
`segments` data structure.
- Add keyword highlighting in `PostCard` and `PostContentRenderer` using `HighlightText`.
- Implement smart excerpt logic in `PostCard` to show relevant context around search keywords.
- Update `SearchBar` styles for better visual feedback and consistency.
- Enhance `SearchScreen` with modern tab variants and improved tag styling.
- Add support for updating group descriptions in `GroupInfoScreen` and `GroupService`.
- Refactor various UI components for improved layout stability and typography.
- Fix keyboard avoidance logic in PostDetailScreen and ChatScreen by applying manual keyboard height offsets only on Android, preventing double padding on iOS.
- Prevent multiple view recording calls in TradeDetailScreen by using a ref to track if the view has already been recorded.
- fix schedule screen layout by measuring day width on web to prevent overflow
- add overflow hidden to schedule grid cells
- refactor trade detail screen styles for better organization and readability
- update trade detail seller card and avatar components
- expand trade type and status maps in trade detail screen
This commit implements a major architectural refactor to improve modularity, type safety, and maintainability across the codebase.
Key changes include:
- **Responsive System Refactor**: Migrated from a monolithic `useResponsive` hook to a set of specialized, granular hooks (`useBreakpoint`, `useOrientation`, `usePlatform`, etc.) located in `src/presentation/hooks/responsive`. This reduces unnecessary re-renders and improves developer experience.
- **Core Service Restructuring**: Introduced a new directory structure for services, including dedicated folders for `datasources`, `mappers`, and domain-specific types (`message`, `post`).
- **Data Layer Improvements**:
- Centralized JSON parsing logic in `src/database/core/jsonUtils.ts`.
- Cleaned up repository implementations by removing redundant local utility functions.
- Refactored `MessageMapper` to use the new centralized JSON utility.
- **Type System Cleanup**:
- Decomposed the large `src/types/dto.ts` into a modular `src/types/dto/` directory.
- Simplified `src/types/index.ts` and introduced backward-compatible aliases for core entities.
- **Utility Consolidation**:
- Created a centralized `src/utils/formatTime.ts` to replace fragmented date formatting logic across various screens and components.
- Removed deprecated responsive utility files in favor of the new hook-based system.
- **Service Logic Refinement**: Refactored `ApiClient` and `WebSocketService` to use a centralized `showVerificationModal` service, removing duplicated state management for verification prompts.
- Add `ota-ios` job to GitHub Actions workflow to support iOS OTA updates
- Refactor `ScheduleScreen` to use `GestureDetector` and `Gesture` from `react-native-gesture-handler` instead of `PanGestureHandler`
- Update `TradeCard` styles and layout spacing in `HomeScreen` and `MarketView`
- Refactor `MarketView` to use updated responsive spacing values
Add `getLastMessageByConversation` to `MessageRepository` to allow fetching the most recent message for a specific conversation.
Update `ConversationListRow` to use this new repository method as a fallback when message segments are missing, ensuring the conversation list preview displays the last message content correctly.
Add support for a new `sync_required` WebSocket message type to trigger
incremental synchronization of conversations, unread counts, and active
messages. Also implement an `ack` mechanism to acknowledge received
messages.
Refactor the navigation and header strategy by replacing native stack headers with a custom `SimpleHeader` component across most profile and detail screens. This provides a more consistent UI/UX and better control over layout behavior.
- Implement `SimpleHeader` component in `src/components/common`.
- Disable native header rendering in `app/(app)/(tabs)/profile/_layout.tsx` and `app/_layout.tsx`.
- Update profile sub-screens to use `SimpleHeader` and `StatusBar` from `expo-status-bar`.
- Refactor `PostDetailScreen` to use a custom header implementation for better integration with the post author information.
- Update `UserScreen` to wrap content in `SafeAreaView` with the new header.
- Adjust `AppBackButton` to support transparent backgrounds.
Replaced the previous approach of tracking @mentions using private Unicode characters (U+E000-U+F8FF) with a simpler regex-based solution that extracts mention ranges directly from input text. This eliminates the complex overlay rendering logic and corresponding styles/types.
Add visual overlay rendering for @mention chips in the chat input using Unicode private use area characters as invisible placeholders. The implementation includes chip data tracking via `MentionChipMap`, dynamic segment parsing to separate chip and text content for overlay display, and updated memo comparison in `MessageBubble` to include avatar press handlers for proper re-render prevention.
- Add backend error_code support (INVALID_CREDENTIALS, USER_BANNED, etc.)
- Improve network error detection with code=0 fallback
- Add granular HTTP status code handling (400, 401, 403, 429, 5xx)
- Update LoginScreen to display authStore error or generic message
- Include notification service improvements:
- Keep JPush connection alive in background via setKeepLongConnInBackground
- Add manual sound/vibration for local notifications via preferences
- Fix SearchScreen layout by accounting for floating tab bar and safe area
Support both 'chat_message' and 'chat' notification types with flexible field name handling (snake_case and camelCase variants). Add groupId and groupName parameters for group chats, and fall back to notifications screen when conversationId is missing.
- Add vibration feedback when app is in foreground and notification arrives
- Configure Android notification channel using expo-notifications
- Integrate notification handler to respect user push/sound preferences
- Add platform-specific local notification handling for Android
Let me analyze the changes:
1. PrivacyPolicyScreen.tsx:
- Updated LAST_UPDATED date from '2026年4月4日' to '2026年4月28日'
- Added detailed third-party SDK disclosure section:
- Added JPush (极光推送) with provider details, purpose, collected data, and privacy policy link
- Added Expo推送服务 with provider details, purpose, and collected data
2. TermsOfServiceScreen.tsx:
- Updated LAST_UPDATED date from '2026年4月4日' to '2026年4月28日'
- Added section 6.4 about third-party SDKs (JPush) and reference to privacy policy
These changes are:
- Documentation/legal text updates
- Related to privacy and terms screens
- Adding third-party SDK disclosure (JPush)
The primary type should be: docs (documentation changes)
Scope could be: profile or privacy/terms related
Description should focus on the third-party SDK disclosure update
This is different from the previous commit which was about notification integration. This commit is about updating legal/policy documents to disclose third-party SDKs.
Let me craft a conventional commit message:
type: docs
scope: profile or privacy
description: update privacy policy and terms to disclose third-party SDKs
Body could explain:
- Added JPush SDK disclosure with provider info, data collected, privacy policy link
- Added Expo push service disclosure
- Updated terms of service to reference third-party SDKs
- Updated last update dates
Breaking changes: None
Footer: Could reference related issue if any, but none provided.
Let me write the commit message:
```
docs(privacy): update privacy policy and terms to disclose third-party SDKs
- Add JPush SDK disclosure with provider details, data collection purposes, and privacy policy link
- Add Expo push service disclosure with provider and collected data information
- Update terms of service to reference third-party SDK usage
- Update document dates to April 28, 2026
```
I need to verify this is sufficiently distinct from the previous commit. The last one was "feat(notification): integrate expo-notifications..." so using "docs(privacy)" with this specific focus on third-party SDK disclosure makes sense and clearly differs from the prior notification feature work.
</think>
docs(privacy): update privacy policy and terms to disclose third-party SDKs
- Add JPush SDK disclosure with provider details, data collection purposes, and privacy policy link
- Add Expo push service disclosure with provider and collected data information
- Update terms of service to reference third-party SDK usage per privacy policy
- Update document dates to April 28, 2026
- Add expo-notifications dependency and configure with JPush plugin
- Request notification permission on app launch for iOS/Android
- Handle notification taps to navigate to chat or notifications screen
- Add UI to check and request system notification permission in settings
- Refactor background sync: WebSocket disconnects in background, JPush handles push
- Add checkNotificationPermission() and requestNotificationPermission() to jpushService
Replace expo-notifications with JPush for push notifications across the app.
This includes adding JPush native module dependencies, configuring the JPush
plugin in app.json, implementing jpushService wrapper, and updating notification
services to use JPush APIs. Also adds device registration on token refresh for
both mobile and web platforms.
BREAKING CHANGE: expo-notifications removed in favor of JPush for push notifications
Adds the Gradle Toolchains Foojay Resolver plugin to enable automatic JDK
downloads and toolchain management, allowing the project to specify required
JDK versions without manual installation.