diff options
| author | 2022-05-09 15:59:21 +0200 | |
|---|---|---|
| committer | 2022-05-09 15:59:21 +0200 | |
| commit | 9d1930d9adb4f56ae12209d3d01f4a1ed1af8503 (patch) | |
| tree | e0f61d1a5f8162d78304577477674d5471efa0a6 /app/layout/aside_feed.phtml | |
| parent | 893d4d14c06fcb72835f8e152cd6f22f3209263e (diff) | |
Allow many (20k+) feeds (#4347)
* Allow many (20k+) feeds
Fix errors such as `SQL error listWhereRaw: ERROR: value "42926" is out of range for type smallint`
Start of UI performance improvements accordingly.
Diffstat (limited to 'app/layout/aside_feed.phtml')
| -rw-r--r-- | app/layout/aside_feed.phtml | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index c843eb4d2..39804b8f4 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -71,7 +71,7 @@ </li> <?php - foreach ($this->categories as $cat) { + foreach ($this->categories as $cat): $feeds = $cat->feeds(); $position = $cat->attributes('position'); if (!empty($feeds)) { @@ -88,28 +88,29 @@ </div> <ul class="tree-folder-items<?= $c_show ? ' active' : '' ?>"> - <?php - foreach ($feeds as $feed) { - $f_active = FreshRSS_Context::isCurrentGet('f_' . $feed->id()); - ?> - <li id="f_<?= $feed->id() ?>" class="item feed<?= $f_active ? ' active' : '', $feed->mute() ? ' mute' : '' ?><?= - $feed->inError() ? ' error' : '' ?><?= $feed->nbEntries() <= 0 ? ' empty' : '' - ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"> - <div class="dropdown no-mobile"> - <div class="dropdown-target"></div> - <a class="dropdown-toggle" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a> - <?php /* feed_config_template */ ?> - </div> - <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?> - <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= - _url('index', $actual_view, 'get', 'f_' . $feed->id()). $state_filter_manual ?>"><?= $feed->name() ?></a> - </li> - <?php } ?> +<?php + // NB: Reduce whitespace in that loop + foreach ($feeds as $feed): + $f_active = FreshRSS_Context::isCurrentGet('f_' . $feed->id()); +?> +<li id="f_<?= $feed->id() ?>" class="item feed<?= $f_active ? ' active' : '', $feed->mute() ? ' mute' : '' ?><?= + $feed->inError() ? ' error' : '' ?><?= $feed->nbEntries() <= 0 ? ' empty' : '' + ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"> + <div class="dropdown no-mobile"> + <div class="dropdown-target"></div><a class="dropdown-toggle" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a><?php /* feed_config_template */ ?> + </div> + <?php + if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; + ?><a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= + _url('index', $actual_view, 'get', 'f_' . $feed->id()) . $state_filter_manual ?>"><?= $feed->name() ?></a></li> +<?php + endforeach; +?> </ul> </li> <?php } - } + endforeach; ?> <li class="tree-bottom"></li> </ul> |
