forked from Kieran/snort
sort bug in the event that your pubkey is the 2nd item in the list
This commit is contained in:
parent
d2751f8a4a
commit
61c88d654c
@ -57,8 +57,9 @@ export default function MessagesPage() {
|
||||
<div className="btn" onClick={() => markAllRead()}>Mark All Read</div>
|
||||
</div>
|
||||
{chats.sort((a, b) => {
|
||||
if(b.pubkey === myPubKey) return 1
|
||||
return b.newestMessage - a.newestMessage
|
||||
return a.pubkey === myPubKey ? -1 :
|
||||
b.pubkey === myPubKey ? 1 :
|
||||
b.newestMessage - a.newestMessage
|
||||
}).map(person)}
|
||||
</>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user