build(config): update bundle identifier and add signing plugin
All checks were successful
Frontend CI / ota-ios (push) Successful in 1m33s
Frontend CI / ota-android (push) Successful in 1m40s
Frontend CI / build-and-push-web (push) Successful in 2m37s
Frontend CI / build-android-apk (push) Successful in 1h22m51s

feat(notification): improve JPush integration and message sync reliability

- Update iOS bundle identifier to `cn.qczlit.weiyou`
- Add `withSigning` Expo plugin
- Enhance `withJPush` plugin with improved Swift AppDelegate injection logic
- Update JPush default channel to `developer-default`
- Optimize `MessageSyncService` to prevent race conditions in unread count updates
- Implement promise deduplication for `fetchUnreadCount` to prevent redundant network requests
- Add `setConversationsWithUnread` to `useMessageStore` for atomic state updates of conversations and unread counts
This commit is contained in:
2026-05-12 01:28:46 +08:00
parent 1d9c312c6c
commit 7c7aaf9108
8 changed files with 243 additions and 32 deletions

View File

@@ -79,6 +79,11 @@ export interface MessageActions {
// 设置状态
setConversations: (conversations: Map<string, ConversationResponse>) => void;
setConversationsWithUnread: (
conversations: Map<string, ConversationResponse>,
totalUnread: number,
systemUnread: number,
) => void;
updateConversation: (conversation: ConversationResponse) => void;
removeConversation: (conversationId: string) => void;
setMessages: (conversationId: string, messages: MessageResponse[]) => void;
@@ -255,6 +260,27 @@ export const useMessageStore = create<MessageStore>((set, get) => ({
}));
},
setConversationsWithUnread: (
conversations: Map<string, ConversationResponse>,
totalUnread: number,
systemUnread: number,
) => {
const conversationList = sortConversationList(conversations);
const notificationMutedMap = new Map<string, boolean>();
conversations.forEach((conv, id) => {
if (conv.notification_muted) {
notificationMutedMap.set(id, true);
}
});
set(state => ({
conversations,
conversationList,
notificationMutedMap: new Map([...state.notificationMutedMap, ...notificationMutedMap]),
totalUnreadCount: totalUnread,
systemUnreadCount: systemUnread,
}));
},
updateConversation: (conversation: ConversationResponse) => {
const id = normalizeConversationId(conversation.id);
set(state => {