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