onTotalUnreadMessageCountChanged
Feature Introduction
info
Callback when the total unread message count changes.
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- Unity
Return Prototype
Function(int count)? onTotalUnreadMessageCountChanged;
Return Result
Name | Type | Description |
---|---|---|
count | int | Unread count |
Return Prototype
- (void)onTotalUnreadMessageCountChanged:(NSInteger)totalUnreadCount;
Return Result
Name | Type | Description |
---|---|---|
totalUnreadCount | NSInteger | Unread count |
Return Prototype
void onTotalUnreadMessageCountChanged(int count)
Return Result
Name | Type | Description |
---|---|---|
count | int | Unread count change |
Return Prototype
onTotalUnreadMessageCountChanged(data: WSEvent<number>): void;
Return Result
Name | Type | Description |
---|---|---|
data | WSEvent<number> | Unread count |
Example Call
import { getSDK, CbEvents } from '@openim/wasm-client-sdk';
// or
// import { getSDK, CbEvents } from '@openim/client-sdk';
// const IMSDK = getSDK();
const IMSDK = getSDK();
IMSDK.on(CbEvents.OnTotalUnreadMessageCountChanged, ({ data }) => {
// data is the unread message count
});
Return Prototype
onTotalUnreadMessageCountChanged(data: WSEvent<number>): void;
Return Result
Name | Type | Description |
---|---|---|
data | WSEvent<number> | Unread count |
Example Call
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.subscribe(IMSDK.IMEvents.OnTotalUnreadMessageCountChanged, ({ data }) => {
// data is the unread message count
});