mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: fix messages sort
This commit is contained in:
1 parent
d53d0c65e0
commit
f30898ea31
3 files changed
+7
-6
No files matched your search
@@ -67,7 +67,9 @@ export default connect(mapStateToProps)(class MessagePadDialogueContentContainer
|
||||
|
||||
renderInner() {
|
||||
if (this.props.activeId === null) return [];
|
||||
return this.props.item.messages.map((msg) => (
|
||||
const sorted = this.props.item.messages
|
||||
.sort((msg1, msg2) => parseMongoId(msg1._id).timestamp - parseMongoId(msg2._id).timestamp);
|
||||
return sorted.map((msg) => (
|
||||
<Message
|
||||
key={msg._id}
|
||||
isSelf={msg.from === UserContext._id}
|
||||
|
||||
Reference in new issue
Block a user