Skip to content

Commit

Permalink
Fixed test on start setting not applied (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Peyronnet committed Dec 30, 2023
1 parent e9d8a9f commit 7283126
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions InternetTest/InternetTest/Pages/HomePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
VerticalAlignment="Center"
FontFamily="../Fonts/#FluentSystemIcons-Filled"
FontSize="32"
Foreground="{DynamicResource Green}"
Text="" />
Foreground="{DynamicResource Accent}"
Text="" />
<StackPanel
Grid.Column="1"
Margin="5 0 0 0"
Expand All @@ -78,7 +78,7 @@
x:Name="StatusTxt"
FontSize="10"
FontWeight="SemiBold"
Text="{x:Static lang:Resources.ConnectedS}" />
Text="{x:Static lang:Resources.Unknown}" />
</StackPanel>
<Button
x:Name="RefreshStatusBtn"
Expand Down
4 changes: 2 additions & 2 deletions InternetTest/InternetTest/Pages/HomePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ internal async void InitUI()
}

// Load "Status" section
LoadStatusCard();
if (Global.Settings.TestOnStart) LoadStatusCard();

// Load "Network" section
LoadNetworkCard();
Expand All @@ -94,7 +94,7 @@ private async void RefreshStatusBtn_Click(object sender, System.Windows.RoutedEv

bool connected = true;
internal async void LoadStatusCard()
{
{
connected = await Internet.IsAvailableAsync(Global.Settings.TestSite); // Check if Internet is available
StatusTxt.Text = connected ? Properties.Resources.ConnectedS : Properties.Resources.NotConnectedS; // Set text
StatusIconTxt.Text = connected ? "\uF299" : "\uF36E";
Expand Down

0 comments on commit 7283126

Please sign in to comment.