From: Olivier Goffart Date: Mon, 19 Oct 2015 16:32:34 +0000 (+0200) Subject: Folder Model: don't try to fetch data if the account is disconnected X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1534 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4369e31a495e384ccc94bfe813100f10e3a87d57;p=nextcloud-desktop.git Folder Model: don't try to fetch data if the account is disconnected Now that it expands automatically, it would do lots of query to the server when the account is disconnected. (all resulting in 401) --- diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index 5cfa63683..d0e4905eb 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -466,6 +466,9 @@ bool FolderStatusModel::hasChildren(const QModelIndex& parent) const bool FolderStatusModel::canFetchMore(const QModelIndex& parent) const { + if (_accountState->state() != AccountState::Connected) { + return false; + } auto info = infoForIndex(parent); if (!info || info->_fetched || info->_fetching) return false;