mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge pull request #8548 from nextcloud/bugfix/noid/macos-vfs-initial-state
fix(macOS): fix initial VFS activation step
This commit is contained in:
commit
3bf8060628
@ -42,7 +42,7 @@ public:
|
||||
[[nodiscard]] Q_INVOKABLE FileProviderDomainSyncStatus *domainSyncStatusForAccount(const QString &userIdAtHost) const;
|
||||
|
||||
public slots:
|
||||
void setVfsEnabledForAccount(const QString &userIdAtHost, const bool setEnabled);
|
||||
void setVfsEnabledForAccount(const QString &userIdAtHost, const bool setEnabled, const bool showInformationDialog = true);
|
||||
void setTrashDeletionEnabledForAccount(const QString &userIdAtHost, const bool setEnabled);
|
||||
void resetVfsForAccount(const QString &userIdAtHost);
|
||||
|
||||
|
||||
@ -358,13 +358,13 @@ bool FileProviderSettingsController::vfsEnabledForAccount(const QString &userIdA
|
||||
return d->vfsEnabledForAccount(userIdAtHost);
|
||||
}
|
||||
|
||||
void FileProviderSettingsController::setVfsEnabledForAccount(const QString &userIdAtHost, const bool setEnabled)
|
||||
void FileProviderSettingsController::setVfsEnabledForAccount(const QString &userIdAtHost, const bool setEnabled, const bool showInformationDialog)
|
||||
{
|
||||
const auto enabledAccountsAction = d->setVfsEnabledForAccount(userIdAtHost, setEnabled);
|
||||
if (enabledAccountsAction == MacImplementation::VfsAccountsAction::VfsAccountsEnabledChanged) {
|
||||
emit vfsEnabledAccountsChanged();
|
||||
|
||||
if (setEnabled) {
|
||||
if (setEnabled && showInformationDialog) {
|
||||
QMessageBox::information(nullptr,
|
||||
tr("macOS virtual files enabled"),
|
||||
tr("Virtual files have been enabled for this account.\n"
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
|
||||
#ifdef BUILD_FILE_PROVIDER_MODULE
|
||||
#include "gui/macOS/fileprovider.h"
|
||||
#include "gui/macOS/fileprovidersettingscontroller.h"
|
||||
#endif
|
||||
|
||||
#include <QAbstractButton>
|
||||
@ -680,20 +681,19 @@ void OwncloudSetupWizard::slotAssistantFinished(int result)
|
||||
auto account = applyAccountChanges();
|
||||
|
||||
#ifdef BUILD_FILE_PROVIDER_MODULE
|
||||
if (Mac::FileProvider::fileProviderAvailable()) {
|
||||
if (Mac::FileProvider::fileProviderAvailable() && _ocWizard->useVirtualFileSync()) {
|
||||
Mac::FileProvider::instance()->domainManager()->addFileProviderDomainForAccount(account);
|
||||
// let the user settings know that VFS is enabled
|
||||
Mac::FileProviderSettingsController::instance()->setVfsEnabledForAccount(
|
||||
Mac::FileProviderDomainManager::fileProviderDomainIdentifierFromAccountState(AccountStatePtr(account)),
|
||||
true,
|
||||
false
|
||||
);
|
||||
_ocWizard->appendToConfigurationLog(
|
||||
tr("<font color=\"green\"><b>File Provider-based account %1 successfully created!</b></font>").arg(account->account()->userIdAtHostWithPort()));
|
||||
_ocWizard->done(result);
|
||||
emit ownCloudWizardDone(result);
|
||||
|
||||
QMessageBox::information(nullptr,
|
||||
tr("Virtual files enabled"),
|
||||
tr("Your account is now syncing with virtual files support. "
|
||||
"This means that all your files are online-only by default, "
|
||||
"and will be downloaded on-demand when you open them. "
|
||||
"You may find your files under the <b>Locations</b> section of the Finder sidebar."));
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user