+20
-7
src/routes/notifications.tsx
+20
-7
src/routes/notifications.tsx
···
359
359
360
360
const all = likes + replies + reposts + quotes;
361
361
362
-
const failLikes = filters.likes && likes < 1;
363
-
const failReposts = filters.reposts && reposts < 1;
364
-
const failReplies = filters.replies && replies < 1;
365
-
const failQuotes = filters.quotes && quotes < 1;
362
+
//const failLikes = filters.likes && likes < 1;
363
+
//const failReposts = filters.reposts && reposts < 1;
364
+
//const failReplies = filters.replies && replies < 1;
365
+
//const failQuotes = filters.quotes && quotes < 1;
366
366
367
367
const showLikes = filters.showAll || filters.likes
368
368
const showReposts = filters.showAll || filters.reposts
369
369
const showReplies = filters.showAll || filters.replies
370
370
const showQuotes = filters.showAll || filters.quotes
371
371
372
-
const showNone = !showLikes && !showReposts && !showReplies && !showQuotes;
372
+
//const showNone = !showLikes && !showReposts && !showReplies && !showQuotes;
373
+
374
+
//const fail = failLikes || failReposts || failReplies || failQuotes || showNone;
375
+
376
+
const matchesLikes = filters.likes && likes > 0;
377
+
const matchesReposts = filters.reposts && reposts > 0;
378
+
const matchesReplies = filters.replies && replies > 0;
379
+
const matchesQuotes = filters.quotes && quotes > 0;
373
380
374
-
const fail = failLikes || failReposts || failReplies || failQuotes || showNone;
381
+
const matchesAnything =
382
+
filters.showAll ||
383
+
matchesLikes ||
384
+
matchesReposts ||
385
+
matchesReplies ||
386
+
matchesQuotes;
375
387
388
+
if (!matchesAnything) return null;
376
389
377
-
if (fail) return;
390
+
//if (fail) return;
378
391
379
392
return (
380
393
<div className="flex flex-col">