removeConversationListener

Introduction

Remove a specific conversation listener.

  1. It will remove all the conversation listeners if do not provide any specific conversation listener.

Parameter details

Parameter name Parameter type Required Description
listener V2TimConversationListener no The conversation listener to remove.

Returned template

void

Return value details

This function has no return value

Code example

import {
    TencentImSDKPlugin,
    V2TimConversationListener,
} from 'react-native-tim-js';


const listener: V2TimConversationListener = {
    onConversationChanged: (conversationList) => {


    },
    onNewConversation: (conversationList) => {


    },
    onSyncServerFailed: () => {

    },
    onSyncServerFinish: () => {

    },
    onSyncServerStart: () => {

    },
    onTotalUnreadMessageCountChanged: (totalUnreadCount) => {


    },
};

TencentImSDKPlugin.v2TIMManager
    .getConversationManager()
    .addConversationListener(listener);

TencentImSDKPlugin.v2TIMManager
    .getConversationManager()
    .removeConversationListener(listener);

results matching ""

    No results matching ""