mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 03:14:30 +03:00
Merge pull request #4216 from urbit/la/fix-4164
4164: fixes display issue with jobs / gigs based on faulty hark state
This commit is contained in:
commit
2725f5b2c0
@ -46,16 +46,17 @@ export function useGraphModule(
|
||||
): SidebarAppConfig {
|
||||
const getStatus = useCallback(
|
||||
(s: string) => {
|
||||
const unreads = graphUnreads?.[s]?.['/']?.unreads;
|
||||
if(typeof unreads === 'number' ? unreads > 0 : unreads?.size ?? 0 > 0) {
|
||||
return 'unread';
|
||||
}
|
||||
const [, , host, name] = s.split("/");
|
||||
const graphKey = `${host.slice(1)}/${name}`;
|
||||
|
||||
if (!graphKeys.has(graphKey)) {
|
||||
return "unsubscribed";
|
||||
}
|
||||
|
||||
const unreads = graphUnreads?.[s]?.['/']?.unreads;
|
||||
if (typeof unreads === 'number' ? unreads > 0 : unreads?.size ?? 0 > 0) {
|
||||
return 'unread';
|
||||
}
|
||||
|
||||
return undefined;
|
||||
},
|
||||
[graphs, graphKeys, graphUnreads]
|
||||
|
Loading…
Reference in New Issue
Block a user