Repository navigation
Commit 4e07c33
committed
fix(filter): update filtered badge on mark-as-read actions
The "· N filtered" badge was not updating after marking notifications
as read, because storage.onChanged is debounced during animations.
- Add onMarkAsReadSuccess callback to notification-renderer so popup
refreshes the filtered count after a single mark-as-read
- Reset filtered badge to 0 after mark-all-as-read clears storage
- Extract refreshFilteredBadge to avoid unnecessary DOM rendering
into the hidden filtered list container
- Normalize remote filter rules (trim + drop empty strings) to prevent
keywords: [""] from hiding all notifications
- Validate rules array shape in getFilterGist before returning1 parent 014c813 commit 4e07c33
4 files changed
Lines changed: 36 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1055 | 1055 | | |
1056 | 1056 | | |
1057 | 1057 | | |
1058 | | - | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1067 | 1072 | | |
1068 | 1073 | | |
1069 | 1074 | | |
| |||
1087 | 1092 | | |
1088 | 1093 | | |
1089 | 1094 | | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | 1095 | | |
1094 | 1096 | | |
1095 | 1097 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1054 | 1054 | | |
1055 | 1055 | | |
1056 | 1056 | | |
1057 | | - | |
| 1057 | + | |
| 1058 | + | |
1058 | 1059 | | |
1059 | | - | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | 1062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
139 | 147 | | |
140 | 148 | | |
141 | 149 | | |
| |||
385 | 393 | | |
386 | 394 | | |
387 | 395 | | |
| 396 | + | |
388 | 397 | | |
389 | 398 | | |
390 | 399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
| 749 | + | |
749 | 750 | | |
750 | 751 | | |
751 | 752 | | |
| |||
1720 | 1721 | | |
1721 | 1722 | | |
1722 | 1723 | | |
1723 | | - | |
1724 | | - | |
| 1724 | + | |
1725 | 1725 | | |
1726 | 1726 | | |
1727 | | - | |
1728 | 1727 | | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
1729 | 1735 | | |
1730 | 1736 | | |
1731 | 1737 | | |
| |||
1936 | 1942 | | |
1937 | 1943 | | |
1938 | 1944 | | |
| 1945 | + | |
1939 | 1946 | | |
1940 | 1947 | | |
1941 | 1948 | | |
| |||
0 commit comments