Skip to content

Commit

Permalink
Fix "mark all read"
Browse files Browse the repository at this point in the history
  • Loading branch information
timendum committed Sep 23, 2024
1 parent d152fa6 commit 18d1eac
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions app/fportal/components/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,13 @@ export default function Widget({ feed, config, updateConfig, updateFeed, move }:
.then(() => {
const newRows = [...rows];
let marked = 0;
if (data == "current") {
newRows.forEach((row) => {
if (row.categories.indexOf("user/-/state/com.google/read") === -1) {
marked += 1;
row.categories.push("user/-/state/com.google/read");
}
});
} else {
newRows.forEach((row) => {
if (row.categories.indexOf("user/-/state/com.google/read") === -1) {
marked += 1;
row.categories.push("user/-/state/com.google/read");
}
});
if (data != "current") {
marked = feed.unread;
}
feed.unread = Math.max(0, feed.unread - marked);
Expand Down

0 comments on commit 18d1eac

Please sign in to comment.