mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-08 06:00:45 -07:00
Migrate currency converter endpoints (#524)
We are migrating the REST endpoint that Currency Converter uses. The REST endpoint is not licensed for your use. To continue to enable community participation in the development of the feature, developer builds will use an alternate REST endpoint that serves mock data (clearly identifiable as it references planets instead of countries).
This commit is contained in:
parent
2fd8dc1f9d
commit
2b17f82652
7 changed files with 67 additions and 4 deletions
|
@ -644,6 +644,23 @@ void CurrencyDataLoader::GuaranteeSelectedUnits()
|
|||
isConversionTargetSet = true;
|
||||
}
|
||||
}
|
||||
|
||||
// If still not set for either source or target, just select the first currency in the list
|
||||
|
||||
if (!m_currencyUnits.empty())
|
||||
{
|
||||
if (!isConversionSourceSet)
|
||||
{
|
||||
m_currencyUnits[0].isConversionSource = true;
|
||||
isConversionSourceSet = true;
|
||||
}
|
||||
|
||||
if (!isConversionTargetSet)
|
||||
{
|
||||
m_currencyUnits[0].isConversionTarget = true;
|
||||
isConversionTargetSet = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CurrencyDataLoader::NotifyDataLoadFinished(bool didLoad)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue