diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp index 3c20a95a5..ada65d062 100644 --- a/src/gui/activitywidget.cpp +++ b/src/gui/activitywidget.cpp @@ -145,6 +145,7 @@ void ActivityListModel::slotActivitiesReceived(const QVariantMap& json) _activityLists[ai] = list; // if all activity lists were received, assemble the whole list + // otherwise wait until the others are finished bool allAreHere = true; foreach( ActivityList list, _activityLists.values() ) { if( list.count() == 0 ) { @@ -152,6 +153,8 @@ void ActivityListModel::slotActivitiesReceived(const QVariantMap& json) break; } } + + // FIXME: Be more efficient, if( allAreHere ) { combineActivityLists(); } @@ -190,6 +193,14 @@ void ActivityListModel::fetchMore(const QModelIndex &) } } +void ActivityListModel::slotRefreshActivity(AccountStatePtr ast) +{ + if(ast && _activityLists.contains(ast)) { + _activityLists[ast].clear(); + } + startFetchJob(ast); +} + /* ==================================================================== */ ActivityWidget::ActivityWidget(QWidget *parent) : diff --git a/src/gui/activitywidget.h b/src/gui/activitywidget.h index 034dc3362..266b13791 100644 --- a/src/gui/activitywidget.h +++ b/src/gui/activitywidget.h @@ -88,6 +88,9 @@ public: bool canFetchMore(const QModelIndex& ) const; void fetchMore(const QModelIndex&); +public slots: + void slotRefreshActivity(AccountStatePtr ast); + private slots: void slotActivitiesReceived(const QVariantMap& json);