Enhance MessageList component to include complete contact information during message updates. Implement a new method in ContactManager for retrieving contacts by ID and type, ensuring accurate avatar and nickname display. Trigger UI refresh on data changes to improve user experience.
This commit is contained in:
@@ -21,6 +21,7 @@ export interface Message {
|
||||
isOnline?: boolean;
|
||||
momentsMax: number;
|
||||
momentsNum: number;
|
||||
wechatAccountId: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ export const useWeChatStore = create<WeChatState>()(
|
||||
const contacts =
|
||||
await ContactManager.getUserContacts(currentUserId);
|
||||
const contact = contacts.find(
|
||||
c => c.id === getMessageId[0] && c.type === contactType,
|
||||
c => c.id === getMessageId && c.type === contactType,
|
||||
);
|
||||
|
||||
if (contact) {
|
||||
|
||||
Reference in New Issue
Block a user