Skip to content

Commit 72860fe

Browse files
authored
Fixes a bug: currency converter never shows error message for service failures (microsoft#1799)
* check status before registering callback * optimize the style for error msg
1 parent d1464a1 commit 72860fe

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/CalcViewModel/DataLoaders/CurrencyDataLoader.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,9 @@ void CurrencyDataLoader::ResetLoadStatus()
188188
#pragma optimize("", off) // Turn off optimizations to work around DevDiv 393321
189189
void CurrencyDataLoader::LoadData()
190190
{
191-
RegisterForNetworkBehaviorChanges();
192-
193191
if (!LoadFinished())
194192
{
193+
RegisterForNetworkBehaviorChanges();
195194
create_task([this]() -> task<bool> {
196195
vector<function<future<bool>()>> loadFunctions = {
197196
[this]() { return TryLoadDataFromCacheAsync(); },

src/Calculator/Views/UnitConverter.xaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,8 @@
673673
</ResourceDictionary>
674674
</HyperlinkButton.Resources>
675675
</HyperlinkButton>
676-
<TextBlock Margin="3,7,0,0" Style="{ThemeResource CaptionTextBlockStyle}">
676+
<TextBlock Margin="3,6,0,0" Style="{ThemeResource CaptionTextBlockStyle}">
677677
<Run x:Name="CurrencySecondaryStatus"
678-
FontWeight="SemiBold"
679678
Text=""/>
680679
</TextBlock>
681680
</StackPanel>

0 commit comments

Comments
 (0)