Commit d7d091d1 authored by Steven杜宇's avatar Steven杜宇

// 消息

parent fb476550
......@@ -36,11 +36,12 @@ class YHMessageDetailListVC: YHBaseViewController {
bar.rightBtnClick = {
[weak self] in
guard let self = self else { return }
let unreadMessages = self.msgArr.filter { !$0.isRead }
if unreadMessages.count <= 0 {
YHHUD.flash(message: "暂无未读消息~")
return
}
YHCommonAlertView.show("清除未读", "确定要清除所有未读提示吗?", "取消", "确认") {
if self.msgArr.count <= 0 {
YHHUD.flash(message: "暂无消息~")
return
}
self.markAllMsgsRead()
}
}
......
......@@ -49,8 +49,8 @@ class YHMessageListVC: YHBaseViewController {
bar.rightBtnClick = {
[weak self] in
guard let self = self else { return }
if self.msgArr.count <= 0 {
YHHUD.flash(message: "暂无消息~")
if self.viewModel.unreadTotalCount <= 0 {
YHHUD.flash(message: "暂无未读消息~")
return
}
YHCommonAlertView.show("清除未读", "确定要清除所有未读提示吗?", "取消", "确认") {
......
......@@ -63,7 +63,7 @@ class YHMessageSessionCell: UITableViewCell {
make.width.equalTo(width)
}
self.detailLabel.text = model.lastMessage
self.detailLabel.text = !model.lastMessage.isEmpty ? model.lastMessage : "暂无消息".local
self.timeLabel.text = formatTimestamp(Double(model.lastMessageTime))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment