orderKey field of the V2TimConversation object. This field is an integer that increases as the conversation is activated when a message is sent/received, a draft is set, or the conversation is pinned to the top.getConversationList is called to get the conversation list, it will first return the conversation that is pinned to the top and then other conversations. You can check whether a conversation is pinned to the top through the isPinned field of the V2TIMConversation object.// If `isPinned` is `true`, the conversation is pinned to the top; otherwise, it is not.bool isPinned = true;conversationManager.pinConversation(conversationID: "conversationID", isPinned: isPinned);
addConversationListener API (details) in advance to add a conversation listener, you can get the isPinned value of the V2TimConversation object in onConversationChanged and determine whether the pinned status of a conversation has changed.
Sample code:conversationManager.addConversationListener(listener: V2TimConversationListener(onConversationChanged: (conversationList) {// Latest conversation after the change},));
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback