tangled
alpha
login
or
join now
bad-example.com
/
spacedust-utils
6
fork
atom
demos for spacedust
6
fork
atom
overview
issues
pulls
pipelines
icons for lex groups
bad-example.com
8 months ago
297145eb
a6532200
+19
-2
1 changed file
expand all
collapse all
unified
split
atproto-notifications
src
components
Feed.tsx
+19
-2
atproto-notifications/src/components/Feed.tsx
···
25
25
<ButtonGroup
26
26
options={secondaries.map(({ k, unread, total }) => {
27
27
28
28
+
// blehhhhhhhhhhhh
28
29
29
30
let title = k;
30
31
let icon;
···
46
47
icon = lex?.clients[0]?.icon;
47
48
appName = lex?.name;
48
49
title = lex?.known_sources[k.slice(app.length + 1)] ?? k;
49
49
-
}
50
50
-
if (secondary === 'app') {
50
50
+
51
51
+
} else if (secondary === 'group') {
52
52
+
53
53
+
let appPrefix;
54
54
+
try {
55
55
+
const [nsid, ...rp] = k.split(':');
56
56
+
const parts = nsid.split('.');
57
57
+
const unreversed = parts.toReversed().join('.');
58
58
+
app = psl.parse(unreversed)?.domain ?? 'unknown';
59
59
+
appPrefix = app.split('.').toReversed().join('.');
60
60
+
} catch (e) {
61
61
+
console.error('getting top app failed', e);
62
62
+
}
63
63
+
const lex = lexicons[appPrefix];
64
64
+
icon = lex?.clients[0]?.icon;
65
65
+
appName = lex?.name;
66
66
+
67
67
+
} else if (secondary === 'app') {
51
68
const appReversed = k.split('.').toReversed().join('.');
52
69
const lex = lexicons[appReversed];
53
70
icon = lex?.clients[0]?.icon;