标记已读

This commit is contained in:
2022-02-18 17:20:13 +08:00
parent a03a991292
commit f8c3933e83
2 changed files with 108 additions and 96 deletions

View File

@@ -39,7 +39,7 @@
/* 显示操作弹窗 */
showPop: false,
/* 弹窗按钮列表 */
popButton: ['置顶聊天', '删除该聊天'],
popButton: ['置顶聊天', '标记已读', '删除该聊天'],
/* 弹窗定位样式 */
popStyle: "",
pickedItem: {},
@@ -72,6 +72,9 @@
if (index == 0) {
RongIMLib.setConversationToTop(this.pickedItem.conversationType, this.pickedItem.targetId, !this
.pickedItem.isTop)
} else if (index == 1) {
RongIMLib.clearMessagesUnreadStatus(this.pickedItem.conversationType, this.pickedItem.targetId, this
.pickedItem.sentTime)
} else {
RongIMLib.removeConversation(this.pickedItem.conversationType, this.pickedItem.targetId)
RongIMLib.deleteMessages(this.pickedItem.conversationType, this.pickedItem.targetId)
@@ -96,8 +99,6 @@
style += `left:${touches.clientX}px`
}
this.popButton[0] = item.isTop ? '取消置顶' : '置顶聊天'
this.popStyle = style
this.pickedItem = item