Fixes a bug: currency converter never shows error message for service failures (#1799)
* check status before registering callback * optimize the style for error msg
This commit is contained in:
		@@ -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(); },
 | 
			
		||||
 
 | 
			
		||||
@@ -673,9 +673,8 @@
 | 
			
		||||
                                </ResourceDictionary>
 | 
			
		||||
                            </HyperlinkButton.Resources>
 | 
			
		||||
                        </HyperlinkButton>
 | 
			
		||||
                        <TextBlock Margin="3,7,0,0" Style="{ThemeResource CaptionTextBlockStyle}">
 | 
			
		||||
                        <TextBlock Margin="3,6,0,0" Style="{ThemeResource CaptionTextBlockStyle}">
 | 
			
		||||
                            <Run x:Name="CurrencySecondaryStatus"
 | 
			
		||||
                                 FontWeight="SemiBold"
 | 
			
		||||
                                 Text=""/>
 | 
			
		||||
                        </TextBlock>
 | 
			
		||||
                    </StackPanel>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user