[Pkg-owncloud-commits] [owncloud-client] 107/484: Folder Model: don't try to fetch data if the account is disconnected
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:22 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 4369e31a495e384ccc94bfe813100f10e3a87d57
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Mon Oct 19 18:32:34 2015 +0200
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)
---
src/gui/folderstatusmodel.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp
index 5cfa636..d0e4905 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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list