feat(message): support group avatar in navigation and chat screen
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
This commit is contained in:
@@ -344,6 +344,11 @@ class MessageManager {
|
||||
}
|
||||
|
||||
const task = (async () => {
|
||||
// 确保会话数据在 store 中(JPUSH 通知进入时 store 可能还没有此会话)
|
||||
const store = useMessageStore.getState();
|
||||
if (!store.getConversation(normalizedId)) {
|
||||
await this.fetchConversationDetail(normalizedId);
|
||||
}
|
||||
await this.fetchMessages(normalizedId);
|
||||
})();
|
||||
this.activatingConversationTasks.set(normalizedId, task);
|
||||
|
||||
Reference in New Issue
Block a user