Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-3.12] allow wipe feature to delete data of a wiped user account #6556

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,11 @@ Application::~Application()

void Application::setupAccountsAndFolders()
{
const auto accountsRestoreResult = restoreLegacyAccount();

_folderManager.reset(new FolderMan);
FolderMan::instance()->setSyncEnabled(true);

const auto accountsRestoreResult = restoreLegacyAccount();

const auto foldersListSize = FolderMan::instance()->setupFolders();

const auto prettyNamesList = [](const QList<AccountStatePtr> &accounts) {
Expand Down
18 changes: 10 additions & 8 deletions src/gui/remotewipe.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*

Check notice on line 1 in src/gui/remotewipe.cpp

View workflow job for this annotation

GitHub Actions / build

Run clang-format on src/gui/remotewipe.cpp

File src/gui/remotewipe.cpp does not conform to Custom style guidelines. (lines 38, 40)
* Copyright (C) by Camila Ayres <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -34,10 +34,13 @@
this, [=](AccountState *) {
_accountRemoved = true;
});
QObject::connect(this, &RemoteWipe::authorized, FolderMan::instance(),
&FolderMan::slotWipeFolderForAccount);
QObject::connect(FolderMan::instance(), &FolderMan::wipeDone, this,
&RemoteWipe::notifyServerSuccessJob);
if (FolderMan::instance()) {
QObject::connect(this, &RemoteWipe::authorized, FolderMan::instance(),
&FolderMan::slotWipeFolderForAccount);
QObject::connect(FolderMan::instance(), &FolderMan::wipeDone, this,
&RemoteWipe::notifyServerSuccessJob);
}

QObject::connect(_account.data(), &Account::appPasswordRetrieved, this,
&RemoteWipe::startCheckJobWithAppPassword);
}
Expand Down Expand Up @@ -109,13 +112,12 @@
_account->setRemoteWipeRequested_HACK();
// <-- FIXME MS@2019-12-07

// delete account
manager->deleteAccount(accountState);
manager->save();

// delete data
emit authorized(accountState);

// delete account
manager->deleteAccount(accountState);
manager->save();
} else {
// ask user for his credentials again
accountState->handleInvalidCredentials();
Expand Down
Loading