ActivityListModel: Check if the account is connected when fetching more.

This commit is contained in:
Klaas Freitag 2015-11-02 16:39:33 +01:00
parent 060f4f291b
commit 6c6ee358d4

View file

@ -92,8 +92,10 @@ bool ActivityListModel::canFetchMore(const QModelIndex& ) const
QMap<AccountStatePtr, ActivityList>::const_iterator i = _activityLists.begin();
while (i != _activityLists.end()) {
if( i.value().count() == 0 &&
! _currentlyFetching.contains(i.key())) {
AccountStatePtr ast = i.key();
ActivityList activities = i.value();
if( ast->isConnected() && activities.count() == 0 &&
! _currentlyFetching.contains(ast) ) {
return true;
}
++i;