SDKsiOS
Hide all conversations
Hide every conversation entry for the current account with OpenIM iOS SDK.
Invoke hideAllConversationsWithOnSuccess:onFailure: to hide all conversation entries from the chat list for the currently logged-in account in a single call:
Code example
[[OIMManager manager] hideAllConversationsWithOnSuccess:^(NSString * _Nullable data) {
[self clearConversationList];
} onFailure:^(NSInteger code, NSString *message) {
NSLog(@"hideAllConversations failed: %ld %@", (long)code, message);
}];Return value
The onSuccess callback returns confirmation when the operation succeeds.
State changes after the call
- Local cache reset: The client should clear its in-memory list cache and reset pagination cursors for the conversation screen.
- Persistence and reappearance: This operation only affects list visibility for the current account. It does not delete historical message records or alter friend or group relationships. As soon as any conversation receives a new message, that conversation automatically reappears in the list.
- Re-query calibration: To hide a single specific conversation, refer to Hide a conversation. For conversation listener setup, refer to Retrieve conversation list.
Was this page helpful?