mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-10 01:22:31 -06:00
WebUI: enforce coding style
* WebUI: prefer `classList.toggle()` over other pattern Addresses: https://github.com/qbittorrent/qBittorrent/pull/23231#discussion_r2328647152 * WebUI: prefer using built-in objects Constructor * WebUI: combine function calls PR #23261.
This commit is contained in:
@@ -620,8 +620,8 @@
|
||||
|
||||
if (articlesDiffer) {
|
||||
// update unread count
|
||||
const oldUnread = feedData[r.uid].map((art) => !art.isRead).filter((v) => v).length;
|
||||
const newUnread = r.articles.map((art) => !art.isRead).filter((v) => v).length;
|
||||
const oldUnread = feedData[r.uid].map((art) => !art.isRead).filter(Boolean).length;
|
||||
const newUnread = r.articles.map((art) => !art.isRead).filter(Boolean).length;
|
||||
const unreadDifference = newUnread - oldUnread;
|
||||
|
||||
// find all parents (and self) and add unread difference
|
||||
@@ -733,7 +733,7 @@
|
||||
});
|
||||
|
||||
// calculate number of unread
|
||||
const numberOfUnread = dataEntry.articles.map((art) => !art.isRead).filter((v) => v).length;
|
||||
const numberOfUnread = dataEntry.articles.map((art) => !art.isRead).filter(Boolean).length;
|
||||
// find all items that contain this rss feed and add unread count
|
||||
for (const row of rssFeedTable.getRowValues()) {
|
||||
if (dataEntry.fullName.slice(0, row.full_data.dataPath.length) === row.full_data.dataPath)
|
||||
|
||||
Reference in New Issue
Block a user