markConversation
Introduction
Mark a specific conversation.
You can referring to V2TimConversationMarkType to use markType.
You can add custom markType, if the default types can not meet your needs, while needs to meet the following two requirements and conditions:
The value of the custom markType can not be the same as the default type value.
The custom markType value must be the displacement value of 0x1L << N (32 <= n <64, that N must be greater than or equal to 32 and less than 64), for example, the custom 0x1L << 32 mark value indicates "iPhone online". The extended marking value cannot be set to 0x1 << 32, and it must be set to 0x1L << 32, and clearly tells the compiler is 64 -bit integer constant.
The marking of a conversation will not change the total unread count of it.
Only works since version of 4.0.8.
This method only works with Ultimate Edition, you can find the pricing plan here.
Do not works on Web.
Parameter details
Parameter name | Parameter type | Required | Platform | Description |
---|---|---|---|---|
markType | V2TimConversationMarkType | yes | All | Mark type |
enableMark | bool | yes | All | is enable the mark function |
conversationIDList | List< String > | yes | All | The list of conversation IDs that need to be marked. |
Returned template
V2TimValueCallback<List<V2TimConversationOperationResult>>
{
code : int
desc : String
data : List<V2TimConversationOperationResult>
}
Return value details
name | type | description |
---|---|---|
code | int | Request result: Error codes. 0 means success. |
desc | String | The description of the error. It will be empty if success. |
data | List< V2TimConversationOperationResult > | The list of results. |
Code example
V2TimValueCallback<List<V2TimConversationOperationResult>>
markConversationRes = await TencentImSDKPlugin.v2TIMManager
.getConversationManager()
.markConversation(
markType: 0,
enableMark: true,
conversationIDList: []);
if (markConversationRes.code == 0) {
markConversationRes.data?.forEach((element) {
element.conversationID;
element.resultCode;
element.resultInfo;
});
}