Skip to content

Commit

Permalink
Properly update images in the FMB page
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePBone committed Oct 21, 2020
1 parent 31ac8f0 commit 9065dbd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Galaxy Buds Client/ui/FindMyGearPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,23 +220,24 @@ private void RefreshEarbudIcon()
{
Dispatcher.Invoke(() =>
{
string type = BluetoothService.Instance.ActiveModel == Model.BudsLive ? "Bean" : "Bud";

if (LeftIcon.Visibility == Visibility.Visible)
{
LeftIcon.Source = (ImageSource)Application.Current.Resources.MergedDictionaries[0]["LeftBudConnected"];
LeftIcon.Source = (ImageSource)Application.Current.Resources.MergedDictionaries[0][$"Left{type}Connected"];
}
else
{
LeftIcon.Source = (ImageSource)Application.Current.Resources.MergedDictionaries[0]["LeftBudDisconnected"];
LeftIcon.Source = (ImageSource)Application.Current.Resources.MergedDictionaries[0][$"Left{type}Disconnected"];
}

if (RightIcon.Visibility == Visibility.Visible)
{
RightIcon.Source = (ImageSource)Application.Current.Resources.MergedDictionaries[0]["RightBudConnected"];
RightIcon.Source = (ImageSource)Application.Current.Resources.MergedDictionaries[0][$"Right{type}Connected"];
}
else
{
RightIcon.Source = (ImageSource)Application.Current.Resources.MergedDictionaries[0]["RightBudDisconnected"];
RightIcon.Source = (ImageSource)Application.Current.Resources.MergedDictionaries[0][$"Right{type}Disconnected"];
}
});
}
Expand Down

0 comments on commit 9065dbd

Please sign in to comment.