mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-07 21:51:08 -07:00
Keep input when users refresh currency rates (#369)
Fixes #260 Description of the changes: prevent UnitConverterViewModel to reset values when users click on update rates. recompute UnitConverter's caches (m_ratioMap and m_categoryToUnits) once rates are updated (but check first if the user did/didn't change the category) How changes were validated: Manually tested with fake currency rates (HTTP responses modified on the fly via FiddlerCore) Verified that it works no matter the selected field (From or To) Verified that the currencies selected are kept after a refresh
This commit is contained in:
parent
775771d62a
commit
ad25feda6b
5 changed files with 43 additions and 25 deletions
|
@ -223,6 +223,7 @@ namespace CalculatorApp
|
|||
void UpdateValue2AutomationName();
|
||||
Platform::String^ Serialize();
|
||||
void Deserialize(Platform::String^ state);
|
||||
void ResetCategoriesAndRatio();
|
||||
|
||||
// Saving And Restoring User Preferences of Category and Associated-Units across Sessions.
|
||||
void SaveUserPreferences();
|
||||
|
@ -263,6 +264,7 @@ namespace CalculatorApp
|
|||
void RefreshSupplementaryResults();
|
||||
void UpdateInputBlocked(_In_ const std::wstring& currencyInput);
|
||||
bool UnitsAreValid();
|
||||
void ResetCategory();
|
||||
|
||||
void OnButtonPressed(Platform::Object^ parameter);
|
||||
Platform::String^ ConvertToLocalizedString(const std::wstring& stringToLocalize, bool allowPartialStrings);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue