QTimer::singleShot(1000, this, &FolderStatusModel::slotShowFetchProgress);
}
+void FolderStatusModel::resetAndFetch(const QModelIndex &parent)
+{
+ auto info = infoForIndex(parent);
+ info->resetSubs(this, parent);
+ fetchMore(parent);
+}
+
void FolderStatusModel::slotGatherPermissions(const QString &href, const QMap<QString, QString> &map)
{
auto it = map.find("permissions");
if (f->syncResult().folderStructureWasChanged()
&& (state == SyncResult::Success || state == SyncResult::Problem)) {
// There is a new or a removed folder. reset all data
- auto &info = _folders[folderIndex];
- auto idx = index(folderIndex);
- info.resetSubs(this, idx);
- fetchMore(idx);
+ resetAndFetch(index(folderIndex));
}
}
return;
}
- _folders[folderIndex].resetSubs(this, index(folderIndex));
+ resetAndFetch(index(folderIndex));
emit suggestExpand(index(folderIndex));
emit dirtyChanged();
QModelIndex parent(const QModelIndex &child) const override;
bool canFetchMore(const QModelIndex &parent) const override;
void fetchMore(const QModelIndex &parent) override;
+ void resetAndFetch(const QModelIndex &parent);
bool hasChildren(const QModelIndex &parent = QModelIndex()) const override;
struct SubFolderInfo