MCPcopy Create free account
hub / github.com/KikoPlayProject/KikoPlay / fetchMore

Method fetchMore

MediaLibrary/animemodel.cpp:153–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void AnimeModel::fetchMore(const QModelIndex &)
154{
155 QVector<Anime *> moreAnimes;
156 hasMoreAnimes=false;
157 Notifier::getNotifier()->showMessage(Notifier::LIBRARY_NOTIFY, tr("Fetching..."), NM_PROCESS | NM_DARKNESS_BACK);
158 AnimeWorker::instance()->fetchAnimes(&moreAnimes, currentOffset, limitCount);
159 hasMoreAnimes = moreAnimes.count() >= limitCount;
160 if(moreAnimes.count() > 0)
161 {
162 beginInsertRows(QModelIndex(),animes.count(),animes.count()+moreAnimes.count()-1);
163 animes.append(moreAnimes);
164 endInsertRows();
165 currentOffset += moreAnimes.count();
166 showStatisMessage();
167 }
168 Notifier::getNotifier()->showMessage(Notifier::LIBRARY_NOTIFY, tr("Down"), NM_HIDE);
169}
170

Callers

nothing calls this directly

Calls 4

fetchAnimesMethod · 0.80
countMethod · 0.80
showMessageMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected