diff options
| author | 2023-11-08 20:23:54 +0100 | |
|---|---|---|
| committer | 2023-11-08 20:23:54 +0100 | |
| commit | 348028a29043b7d1d0f80544c44f0454b2c375c3 (patch) | |
| tree | 8f01badaa6983341f27e8afb05e2e9d42992b9b0 /p/scripts | |
| parent | 7d26dcc8475e4c7c3f68358405e9074ed61e018c (diff) | |
New feature important feeds (#5782)
* New feature important feeds
* Fix PHPStan
* Initial style for important feeds + keep unread
* Change UI order
* Count important unread
* Never mark as read important feeds during scroll
* Fix i18n conf.iew.normal regression
* Fix reader view
* More fix reader view
* Create important.svg
* Fix title
* Fix counter
* Account for important during mark-all-as-read
* Fix underline colour
* 📌
* Changelog
---------
Co-authored-by: math-gh <>
Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 4ddafb2bd..b3876f628 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -135,6 +135,15 @@ function incUnreadsFeed(article, feed_id, nb) { } } + // Update unread: important + if (feed_priority >= 20) { + elem = document.querySelector('#aside_feed .important .title'); + if (elem) { + feed_unreads = elem ? str2int(elem.getAttribute('data-unread')) : 0; + elem.setAttribute('data-unread', numberFormat(feed_unreads + nb)); + } + } + // Update unread: favourites if (article && article.closest('div').classList.contains('favorite')) { elem = document.querySelector('#aside_feed .favorites .title'); |
