mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-02 15:13:25 +03:00
SidebarList: fix empty contact nick
This commit is contained in:
parent
93335fc1ea
commit
2e4eda036b
@ -101,7 +101,7 @@ export function SidebarDmItem(props: {
|
||||
}) {
|
||||
const { ship, selected = false } = props;
|
||||
const contact = useContact(ship);
|
||||
const title = contact?.nickname ?? cite(ship) ?? ship;
|
||||
const title = contact?.nickname || (cite(ship) ?? ship)
|
||||
const hideAvatars = false;
|
||||
const img =
|
||||
contact?.avatar && !hideAvatars ? (
|
||||
|
@ -33,10 +33,10 @@ function sidebarSort(
|
||||
const bAppName = bAssoc?.['app-name'];
|
||||
|
||||
const aUpdated = a.startsWith('~')
|
||||
? (inboxUnreads?.[`/${patpToUd(a)}`]?.last)
|
||||
? (inboxUnreads?.[`/${patp2dec(a)}`]?.last)
|
||||
: apps[aAppName]?.lastUpdated(a) || 0;
|
||||
const bUpdated = b.startsWith('~')
|
||||
? (inboxUnreads?.[`/${patpToUd(b)}`]?.last || 0)
|
||||
? (inboxUnreads?.[`/${patp2dec(b)}`]?.last || 0)
|
||||
: apps[bAppName]?.lastUpdated(b) || 0;
|
||||
|
||||
return bUpdated - aUpdated || alphabetical(a, b);
|
||||
|
Loading…
Reference in New Issue
Block a user