Commit 0cae28fe authored by pete谢兆麟's avatar pete谢兆麟

Merge commit '81f17d8c' into xiezhaolin

parents 171bc22e 81f17d8c
......@@ -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,9 @@ class YHMessageListVC: YHBaseViewController {
bar.rightBtnClick = {
[weak self] in
guard let self = self else { return }
if self.msgArr.count <= 0 {
YHHUD.flash(message: "暂无消息~")
let unreadMessages = self.msgArr.filter { $0.unreadCount > 0 }
if unreadMessages.count <= 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