D13135: Introduce Storage::articlesForCache and more lazy-loading

Laurent Montel noreply at phabricator.kde.org
Thu Oct 31 08:34:20 GMT 2019


mlaurent requested changes to this revision.
mlaurent added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> feed.cpp:263
>  
> -    QStringList list = d->m_archive->articles();
> -    for (QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
> -        Article mya(*it, this, d->m_archive);
> +    QVector<Backend::SmallArticle> list = d->m_archive->articlesForCache();
> +    for (const Backend::SmallArticle &article: list) {

const QVector ...

> feed.cpp:788
>  
> -    loadArticles(); // TODO: make me fly: make this delayed
> +    ///loadArticles(); // TODO: make me fly: make this delayed
>  

Remove it as it's commented

> feed.cpp:923
>      if (d->m_totalCount == -1) {
> -        d->m_totalCount = std::count_if(d->articles.constBegin(), d->articles.constEnd(), [](const Article &art) -> bool {
> -            return !art.isDeleted();
> -        });
> +        if (d->m_articlesLoaded)
> +            d->m_totalCount = std::count_if(d->articles.constBegin(), d->articles.constEnd(), [](const Article &art) -> bool {

coding style { ... }

> feed.cpp:927
> +            });
> +        else
> +            d->m_totalCount = d->m_archive->totalCount();

same coding style { ... }

REPOSITORY
  R201 Akregator

REVISION DETAIL
  https://phabricator.kde.org/D13135

To: pinaraf, cgiboudeaux, mlaurent
Cc: mlaurent, kde-pim, fbampaloukas, dvasin, rodsevich, winterz, vkrause, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20191031/fe8d4a10/attachment-0001.html>


More information about the kde-pim mailing list