Refactoring
This commit is contained in:
@@ -321,7 +321,7 @@ HRESULT CSiaDriveDlg::OnButtonUnlockWallet(IHTMLElement* /*pElement*/)
|
||||
std::thread th([this, pwd]() {
|
||||
if (ApiSuccess(_siaApi->GetWallet()->Unlock(pwd)))
|
||||
{
|
||||
QueueUiAction([this]() {
|
||||
ExecuteUiAction([this]() {
|
||||
SetWalletUnlockPassword(L"");
|
||||
SetBodyEnabled(true);
|
||||
ReloadDisplay();
|
||||
@@ -329,7 +329,7 @@ HRESULT CSiaDriveDlg::OnButtonUnlockWallet(IHTMLElement* /*pElement*/)
|
||||
}
|
||||
else
|
||||
{
|
||||
QueueUiAction([this]() {
|
||||
ExecuteUiAction([this]() {
|
||||
SetWalletUnlockPassword(L"");
|
||||
AfxMessageBox(L"Invalid password entered");
|
||||
SetBodyEnabled(true);
|
||||
@@ -520,7 +520,7 @@ void CSiaDriveDlg::OnTimer(UINT_PTR nIDEvent)
|
||||
}
|
||||
}
|
||||
|
||||
void CSiaDriveDlg::QueueUiAction(std::function<void()> fn)
|
||||
void CSiaDriveDlg::ExecuteUiAction(std::function<void()> fn)
|
||||
{
|
||||
if (GetCurrentThreadId() == _uiThreadId)
|
||||
{
|
||||
|
@@ -84,7 +84,7 @@ private:
|
||||
void SetRenterUsedFunds(const SiaCurrency& currency);
|
||||
void SetRenterHosts(const std::uint64_t& hosts);
|
||||
void SetRenterTotalUsed(const std::uint64_t& bytes);
|
||||
void QueueUiAction(std::function<void()> action);
|
||||
void ExecuteUiAction(std::function<void()> action);
|
||||
void ProcessUiActionQueue();
|
||||
void ClearDisplay();
|
||||
|
||||
|
Reference in New Issue
Block a user