Refresh the group chat list of layim

Some time ago, a friend asked me how to refresh the group chat list. In fact, just like the previously integrated refreshing friend list, just remove the group chat from the panel and reload it. Let me talk about it!

1. Add right-click menu

Bind the entrance and add the right-click menu (as shown in the figure). If you haven't seen the integrated right-click menu before, the special plane will take you a journey ✈ layim to integrate the right-click menu
Insert picture description here

2. Clear the data cache

Refreshing the group chat list is actually very simple, but some friends directly remove the html code block, which is invisible to the naked eye and thinks it is successful. In fact, this is not the operation, because removing the html code block does not mean that the local cache data is deleted, resulting in A conflict was encountered in the later operation. Next, attach the code to remove the group list:

// 获取所有群聊
var cacheGroup = layim.cache().group

Guess you like

Origin blog.csdn.net/ii950606/article/details/114989430