| 151 | } |
| 152 | |
| 153 | void 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 |
nothing calls this directly
no test coverage detected