mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
Remove m_is_firstTime
This commit is contained in:
parent
f9b403fbc7
commit
f049b4a3ee
1 changed files with 3 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include "pch.h"
|
||||
|
@ -147,7 +147,6 @@ UnitConverterViewModel::UnitConverterViewModel(const shared_ptr<UCM::IUnitConver
|
|||
Unit2AutomationName = m_localizedOutputUnitName;
|
||||
IsDecimalEnabled = true;
|
||||
|
||||
m_IsFirstTime = true;
|
||||
m_model->Initialize();
|
||||
PopulateData();
|
||||
}
|
||||
|
@ -155,7 +154,6 @@ UnitConverterViewModel::UnitConverterViewModel(const shared_ptr<UCM::IUnitConver
|
|||
void UnitConverterViewModel::ResetView()
|
||||
{
|
||||
m_model->SendCommand(UCM::Command::Reset);
|
||||
m_IsFirstTime = true;
|
||||
OnCategoryChanged(nullptr);
|
||||
}
|
||||
|
||||
|
@ -234,15 +232,8 @@ void UnitConverterViewModel::OnUnitChanged(Object^ parameter)
|
|||
// End timer to show results immediately
|
||||
m_supplementaryResultsTimer->Cancel();
|
||||
}
|
||||
if (!m_IsFirstTime)
|
||||
{
|
||||
SaveUserPreferences();
|
||||
}
|
||||
else
|
||||
{
|
||||
RestoreUserPreferences();
|
||||
m_IsFirstTime = false;
|
||||
}
|
||||
|
||||
SaveUserPreferences();
|
||||
}
|
||||
|
||||
void UnitConverterViewModel::OnSwitchActive(Platform::Object^ unused)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue