onConversationChanged
Description
info
Triggered when key information for some conversations changes, such as changes to the unread count or the last message of a conversation.
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- Unity
Return Prototype
Function(List<ConversationInfo> list)? onConversationChanged;
Return Results
| Name | Type | Description |
|---|---|---|
| list | List<ConversationInfo> | Conversation info |
Return Prototype
- (void)onConversationChanged:(NSArray <OIMConversationInfo *> *)conversations;
Return Results
| Name | Type | Description |
|---|---|---|
| conversations | NSArray < OIMConversationInfo * > | Conversation info |
Return Prototype
void onConversationChanged(List<ConversationInfo> list);
Return Results
| Name | Type | Description |
|---|---|---|
| list | List<ConversationInfo> | Conversation info |
Return Prototype
onConversationChanged(data: WSEvent<ConversationItem[]>): void;
Call Example
import { getSDK } from '@openim/wasm-client-sdk';
const IMSDK = getSDK();
// use in electron with ffi
// import { getWithRenderProcess } from '@openim/electron-client-sdk/lib/render';
// const { instance: IMSDK } = getWithRenderProcess();
// use in mini program
// import { getSDK } from '@openim/client-sdk';
// const IMSDK = getSDK();
IMSDK.on(
CbEvents.OnConversationChanged,
({ data }) => {
// data: conversation info list
}
);
Return Results
| Name | Type | Description |
|---|---|---|
| data | WSEvent<ConversationItem[]> | Conversation info |
Return Prototype
onConversationChanged(data: WSEvent<ConversationItem[]>): void;
Return Results
| Name | Type | Description |
|---|---|---|
| data | WSEvent<ConversationItem[]> | Conversation info |
Call Example
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.subscribe(
IMSDK.IMEvents.OnConversationChanged,
({ data }: WSEvent<ConversationItem[]>) => {
// data: conversation info
}
);
Return Prototype
void OnConversationChanged(List<Conversation> list);
Return Results
| Name | Type | Description |
|---|---|---|
| list | List<Conversation> | Conversation info |