Browse SDKs · iOS
Platform
SDKsiOS

Hide all conversations

Hide every conversation entry for the current account with OpenIM iOS SDK.

Copy

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

  1. Local cache reset: The client should clear its in-memory list cache and reset pagination cursors for the conversation screen.
  2. 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.
  3. Re-query calibration: To hide a single specific conversation, refer to Hide a conversation. For conversation listener setup, refer to Retrieve conversation list.