removeFriendListener

Introduction

Remove friendship listener.

  1. It will remove all the listeners, if no specific listener been provided.

Parameter details

Parameter name Parameter type Required Description
listener V2TimFriendshipListener yes The listener to remove.

Returned template

void

Return value details

This function has no return value

Code example

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


const listener: V2TimFriendshipListener = {
    onBlackListAdd: (infoList) => {


    },
    onBlackListDeleted: (userList) => {


    },
    onFriendApplicationListAdded: (applicationList) => {


    },
    onFriendApplicationListDeleted: (userIDList) => {


    },
    onFriendApplicationListRead: () => {

    },
    onFriendInfoChanged: (infoList) => {


    },
    onFriendListAdded: (users) => {


    },
    onFriendListDeleted: (userList) => {


    },
};
TencentImSDKPlugin.v2TIMManager
    .getFriendshipManager()
    .addFriendListener(listener);


TencentImSDKPlugin.v2TIMManager
    .getFriendshipManager()
    .removeFriendListener(listener);

results matching ""

    No results matching ""