Skip to content

Commit

Permalink
VFS: Tell the vfs plugin whether we have multiple accounts
Browse files Browse the repository at this point in the history
This allows us to decide on the presentation of the account
  • Loading branch information
TheOneRing committed Jun 23, 2020
1 parent bd9c5b9 commit 2efbc96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/common/vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ struct OCSYNC_EXPORT VfsSetupParams
QString providerName;
QString providerVersion;

/** when registering with the system we might use
* a different presentaton to identify the accounts
*/
bool multipleAccountsRegistered = false;

/** Whether native shell integration shall be enabled
*
* For some plugins that doesn't work well in tests.
Expand Down
2 changes: 2 additions & 0 deletions src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "config.h"

#include "account.h"
#include "accountmanager.h"
#include "accountstate.h"
#include "folder.h"
#include "folderman.h"
Expand Down Expand Up @@ -476,6 +477,7 @@ void Folder::startVfs()
vfsParams.journal = &_journal;
vfsParams.providerName = Theme::instance()->appNameGUI();
vfsParams.providerVersion = Theme::instance()->version();
vfsParams.multipleAccountsRegistered = AccountManager::instance()->accounts().size() > 1;

connect(_vfs.data(), &Vfs::beginHydrating, this, &Folder::slotHydrationStarts);
connect(_vfs.data(), &Vfs::doneHydrating, this, &Folder::slotHydrationDone);
Expand Down

0 comments on commit 2efbc96

Please sign in to comment.