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
|
- [ ] Refactor
|
||||||
- Move global modals to child components?
|
- Move global modals to child components?
|
||||||
- Combine app/agent, rename app2
|
- Combine app/agent, rename app2
|
||||||
- Sort DMs
|
|
||||||
- [ ] Improve topic suggestions and rendering
|
- [ ] Improve topic suggestions and rendering
|
||||||
- [ ] Add topic search
|
- [ ] Add topic search
|
||||||
- [ ] Relays bounty
|
- [ ] Relays bounty
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
let activeTab = "messages"
|
let activeTab = "messages"
|
||||||
let contacts = []
|
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)
|
$: contacts = getContacts(activeTab)
|
||||||
|
|
||||||
@ -17,10 +18,8 @@
|
|||||||
activeTab = tab
|
activeTab = tab
|
||||||
}
|
}
|
||||||
|
|
||||||
const accepted = watch("contacts", t => sortBy(e => -e.lastMessage, t.all({accepted: true})))
|
const accepted = watch("contacts", t => t.all({accepted: true}))
|
||||||
const requests = watch("contacts", t =>
|
const requests = watch("contacts", t => t.all({accepted: {$ne: true}}))
|
||||||
sortBy(e => -e.lastMessage, t.all({accepted: {$ne: true}}))
|
|
||||||
)
|
|
||||||
|
|
||||||
const getDisplay = tab => ({
|
const getDisplay = tab => ({
|
||||||
title: toTitle(tab),
|
title: toTitle(tab),
|
||||||
|
Loading…
Reference in New Issue
Block a user