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

Merge commit '81f17d8c' into xiezhaolin

parents 171bc22e 81f17d8c
...@@ -36,11 +36,12 @@ class YHMessageDetailListVC: YHBaseViewController { ...@@ -36,11 +36,12 @@ class YHMessageDetailListVC: YHBaseViewController {
bar.rightBtnClick = { bar.rightBtnClick = {
[weak self] in [weak self] in
guard let self = self else { return } guard let self = self else { return }
YHCommonAlertView.show("清除未读", "确定要清除所有未读提示吗?", "取消", "确认") { let unreadMessages = self.msgArr.filter { !$0.isRead }
if self.msgArr.count <= 0 { if unreadMessages.count <= 0 {
YHHUD.flash(message: "暂无消息~") YHHUD.flash(message: "暂无未读消息~")
return return
} }
YHCommonAlertView.show("清除未读", "确定要清除所有未读提示吗?", "取消", "确认") {
self.markAllMsgsRead() self.markAllMsgsRead()
} }
} }
......
...@@ -49,8 +49,9 @@ class YHMessageListVC: YHBaseViewController { ...@@ -49,8 +49,9 @@ class YHMessageListVC: YHBaseViewController {
bar.rightBtnClick = { bar.rightBtnClick = {
[weak self] in [weak self] in
guard let self = self else { return } guard let self = self else { return }
if self.msgArr.count <= 0 { let unreadMessages = self.msgArr.filter { $0.unreadCount > 0 }
YHHUD.flash(message: "暂无消息~") if unreadMessages.count <= 0 {
YHHUD.flash(message: "暂无未读消息~")
return return
} }
YHCommonAlertView.show("清除未读", "确定要清除所有未读提示吗?", "取消", "确认") { YHCommonAlertView.show("清除未读", "确定要清除所有未读提示吗?", "取消", "确认") {
......
...@@ -63,7 +63,7 @@ class YHMessageSessionCell: UITableViewCell { ...@@ -63,7 +63,7 @@ class YHMessageSessionCell: UITableViewCell {
make.width.equalTo(width) 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)) 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