diff options
author | George Hazan <george.hazan@gmail.com> | 2023-10-16 12:37:04 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-10-16 12:37:04 +0300 |
commit | 5bf3fd51f1dcdd275d38f35d7aebe7bd063eb3db (patch) | |
tree | b4f21317897f586790fefb9cc100c7b784588ee8 /protocols/YAMN/src/browser | |
parent | bc730b337e64b6cf5c2a604e3e27487cf1e252b9 (diff) |
YAMN:
- fixes #3742 (YAMN: добавить опцию "игнорировать настройки всплывающих окон при ручной проверке");
- all manual calls of CreateThread() removed on behalf of mir_forkthread;
- code cleaning
Diffstat (limited to 'protocols/YAMN/src/browser')
-rw-r--r-- | protocols/YAMN/src/browser/mailbrowser.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/YAMN/src/browser/mailbrowser.cpp b/protocols/YAMN/src/browser/mailbrowser.cpp index 73fd293288..15c3310589 100644 --- a/protocols/YAMN/src/browser/mailbrowser.cpp +++ b/protocols/YAMN/src/browser/mailbrowser.cpp @@ -1819,8 +1819,6 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR mir_snwprintf(DeleteMsg, TranslateT("Do you really want to delete %d selected mails?"), Total);
if (IDOK == MessageBox(hDlg, DeleteMsg, TranslateT("Delete confirmation"), MB_OKCANCEL | MB_ICONWARNING)) {
- struct DeleteParam ParamToDeleteMails = { YAMN_DELETEVERSION, ThreadRunningEV, ActualAccount, nullptr };
-
// Find if there's mail marked to delete, which was deleted before
SWriteGuard swm(ActualAccount->MessagesAccessSO);
if (swm.Succeeded()) {
@@ -1832,12 +1830,12 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg, UINT msg, WPARAM wParam, LPAR continue;
}
}
+
// Set flag to marked mails that they can be deleted
SetRemoveFlagsInQueueFcn((HYAMNMAIL)ActualAccount->Mails, YAMN_MSG_DISPLAY | YAMN_MSG_USERDELETE, 0, YAMN_MSG_DELETEOK, 1);
+
// Create new thread which deletes marked mails.
- HANDLE NewThread = mir_forkthread(ActualAccount->Plugin->Fcn->DeleteMailsFcnPtr, &ParamToDeleteMails);
- if (NewThread != nullptr)
- WaitForSingleObject(ThreadRunningEV, INFINITE);
+ mir_forkthread(ActualAccount->Plugin->Fcn->DeleteMailsFcnPtr, new DeleteParam(ActualAccount, 0));
}
}
else // else mark messages that they are not to be deleted
|