mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-19 11:43:35 +00:00
Fix message ordering
This commit is contained in:
parent
d63d8afbbf
commit
c1857dea2d
@ -3,7 +3,6 @@
|
||||
- [ ] Refactor
|
||||
- Move global modals to child components?
|
||||
- Combine app/agent, rename app2
|
||||
- Sort DMs
|
||||
- [ ] Improve topic suggestions and rendering
|
||||
- [ ] Add topic search
|
||||
- [ ] Relays bounty
|
||||
|
@ -9,7 +9,8 @@
|
||||
let activeTab = "messages"
|
||||
let contacts = []
|
||||
|
||||
const getContacts = tab => sortBy(c => -c.lastMessage, tab === "messages" ? $accepted : $requests)
|
||||
const getContacts = tab =>
|
||||
sortBy(c => -c.lastMessage || 0, tab === "messages" ? $accepted : $requests)
|
||||
|
||||
$: contacts = getContacts(activeTab)
|
||||
|
||||
@ -17,10 +18,8 @@
|
||||
activeTab = tab
|
||||
}
|
||||
|
||||
const accepted = watch("contacts", t => sortBy(e => -e.lastMessage, t.all({accepted: true})))
|
||||
const requests = watch("contacts", t =>
|
||||
sortBy(e => -e.lastMessage, t.all({accepted: {$ne: true}}))
|
||||
)
|
||||
const accepted = watch("contacts", t => t.all({accepted: true}))
|
||||
const requests = watch("contacts", t => t.all({accepted: {$ne: true}}))
|
||||
|
||||
const getDisplay = tab => ({
|
||||
title: toTitle(tab),
|
||||
|
Loading…
Reference in New Issue
Block a user