- Android
- iOS
- JavaScript
- Flutter
- ReactNative
- HarmonyOS
Mark the specified conversation as unread. To clear the marked unread state, call Clear Unread Count for a Single Conversation. The marked state is automatically synchronized to the current user's devices.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 1.3.0 |
| callback | ISimpleCallback | Result callback | 1.3.0 |
Code Example
Conversation c = new Conversation(Conversation.ConversationType.GROUP, "groupId1");
JIM.getInstance().getConversationManager().setUnread(c, new IConversationManager.ISimpleCallback() {
@Override
public void onSuccess() {
}
@Override
public void onError(int errorCode) {
}
});
Mark the specified conversation as unread. To clear the marked unread state, call Clear Unread Count for a Single Conversation. The marked state is automatically synchronized to the current user's devices.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | JConversation | Conversation identifier | 1.3.0 |
| successBlock | Success callback | 1.3.0 | |
| errorBlock | Failure callback | 1.3.0 |
Code Example
JConversation *c = [[JConversation alloc] initWithConversationType:JConversationTypeGroup conversationId:@"groupId1"];
[JIM.shared.conversationManager setUnread:c
success:^{
} error:^(JErrorCode code) {
}];
Mark the specified conversation as unread. To clear the marked unread state, call Clear Unread Count for a Single Conversation. The marked state is automatically synchronized to the current user's devices.
Parameters
| Name | Type | Required | Default | Description | Version |
|---|---|---|---|---|---|
| conversation | Object | Yes | None | Object that identifies the conversation | 1.5.0 |
| conversation.conversationId | String | Yes | None | Conversation ID | 1.5.0 |
| conversation.conversationType | Number | Yes | None | Conversation type | 1.5.0 |
| conversation.unreadTag | Number | Yes | Conversation marker state | 1.5.0 |
Code Example
jim.markUnread({
conversationId: '7KeH8fjCO',
conversationType: 2,
unreadTag: UnreadTag.UNREAD,
}).then(() => {
console.log('markunread successfully')
}, (error) => {
console.log(error)
});
Mark the specified conversation as unread. To clear the marked unread state, call Clear Unread Count for a Single Conversation. The marked state is automatically synchronized to the current user's devices.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 1.3.0 |
| callback | ISimpleCallback | Result callback | 1.3.0 |
Code Example
let conver = new Conversation("userid1",1)
JuggleIm.instance.getConversationManager().setUnread(conver,(code)=>{
})
Mark the specified conversation as unread. To clear the marked unread state, call Clear Unread Count for a Single Conversation. The marked state is automatically synchronized to the current user's devices. A successful call triggers a conversation change event.
Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| conversation | Conversation | Conversation identifier | 0.6.3 |
Code Example
Conversation conversation = Conversation(ConversationType.group, 'groupId1');
await JuggleIm.instance.setUnread(conversation);
Mark the specified conversation as unread. To clear the marked unread state, call Clear Unread Count for a Single Conversation. The marked state is automatically synchronized to the current user's devices. A successful call triggers a conversation change event.
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.setUnread({
conversationType: 2,
conversationId: 'groupId1'
});