- Android
- iOS
- JavaScript
- Flutter
- ReactNative
- HarmonyOS
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 1.0.0 |
| callback | IConversationManager.ISimpleCallback | Result callback | 1.0.0 |
Code Example
Conversation conversation = new Conversation(Conversation.ConversationType.GROUP, "groupid1");
JIM.getInstance().getConversationManager().clearUnreadCount(conversation, new IConversationManager.ISimpleCallback() {
@Override
public void onSuccess() {
}
@Override
public void onError(int errorCode) {
}
});
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | JConversation | Conversation identifier | 1.0.0 |
Code Example
JConversation *conversation = [[JConversation alloc] initWithConversationType:JConversationTypeGroup conversationId:@"groupid1"];
[JIM.shared.conversationManager clearUnreadCountByConversation:conversation
success:^{
} error:^(JErrorCode code) {
}];
Parameters
| Name | Type | Required | Default | Description | Version |
|---|---|---|---|---|---|
| conversation | Object | Yes | 1.0.0 | ||
| conversation.conversationType | Number | Yes | Conversation type | 1.0.0 | |
| conversation.conversationId | String | Yes | Conversation ID | 1.0.0 | |
| conversation.unreadIndex | Number | Yes | Index of the last message in the conversation. Available from conversation.latestUnreadIndex. | 1.0.0 | |
| conversation.messageId | String | Yes | messageId of the last message in the conversation. Available from conversation.latestMessage. | 1.0.0 | |
| conversation.messageSentTime | Number | Yes | Send time of the last message in the conversation. Available from conversation.latestMessage. | 1.0.0 |
Code Example
let { ConversationType } = JIM;
let conversation = {
conversationType: ConversationType.PRIVATE,
conversationId: 'userId02',
messageSentTime: 1724675506002,
messageId: 'djdjakdk394alkjda',
unreadIndex: 9
};
jim.clearUnreadcount(conversation).then(() => {
console.log('clear unreadCount successfully');
})
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 0.6.3 |
Code Example
Conversation conversation = Conversation(ConversationType.private, 'user1');
Result result = await JuggleIm.instance.clearUnreadCount(conversation);
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Object | Conversation identifier | 0.6.3 |
| conversationType | Number | Conversation type | 0.6.3 |
| conversationId | String | Conversation ID | 0.6.3 |
Code Example
import JuggleIM from 'juggleim-rnsdk';
await JuggleIM.clearUnreadCount({
conversationType: 1,
conversationId: 'user1'
});
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conver | Conversation | Conversation identifier | 1.0.0 |
| callback | CommonCallback | Result callback | 1.0.0 |
Code Example
let conver = new Conversation("userid1",1)
JuggleIm.instance.getConversationManager().clearUnreadCount(conver,(code)=>{
})