mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 06:13:14 -07:00
check status before registering callback
This commit is contained in:
parent
8870e55edd
commit
c40191fe8b
1 changed files with 1 additions and 2 deletions
|
@ -188,10 +188,9 @@ void CurrencyDataLoader::ResetLoadStatus()
|
|||
#pragma optimize("", off) // Turn off optimizations to work around DevDiv 393321
|
||||
void CurrencyDataLoader::LoadData()
|
||||
{
|
||||
RegisterForNetworkBehaviorChanges();
|
||||
|
||||
if (!LoadFinished())
|
||||
{
|
||||
RegisterForNetworkBehaviorChanges();
|
||||
create_task([this]() -> task<bool> {
|
||||
vector<function<future<bool>()>> loadFunctions = {
|
||||
[this]() { return TryLoadDataFromCacheAsync(); },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue