Skip to content

Commit

Permalink
修复消息列表时间不更新的问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
Finb committed Nov 4, 2024
1 parent 8a0b40c commit e7abff5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion View/MessageTableViewCellViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ extension MessageTableViewCellViewModel: IdentifiableType {

override func isEqual(_ object: Any?) -> Bool {
if let obj = object as? MessageTableViewCellViewModel {
return self.identity == obj.identity
// 消息列表cell上显示的时间需要随着时间的变化而变化(1分钟前、2分钟前 ...),如果时间不一样的就需要刷新界面
return self.identity == obj.identity && self.date.value == obj.date.value
}
return super.isEqual(object)
}
Expand Down

0 comments on commit e7abff5

Please sign in to comment.