Update MainPage.xaml.cs

This commit is contained in:
kawaiizenbo 2024-03-21 12:39:59 -07:00
parent ea7683f1be
commit 1d9099284b

View file

@ -33,7 +33,17 @@ namespace WMstodon
UsernameTextBlock.Text = $"@{myAccount.username}@{new Uri((string)localSettings.Values["instanceURL"]).DnsSafeHost}"; UsernameTextBlock.Text = $"@{myAccount.username}@{new Uri((string)localSettings.Values["instanceURL"]).DnsSafeHost}";
BitmapImage bitmap = new BitmapImage(); BitmapImage bitmap = new BitmapImage();
bitmap.UriSource = new Uri(myAccount.avatar_static); try
{
bitmap.UriSource = new Uri(myAccount.avatar_static);
}
catch
{
localSettings.Values["instanceURL"] = null;
localSettings.Values["accessToken"] = null;
Frame.Navigate(typeof(SelectInstancePage), null);
return;
}
AvatarImage.Source = bitmap; AvatarImage.Source = bitmap;
await LoadFeed(); await LoadFeed();