diff --git a/src/Artemis.UI/Artemis.UI.csproj b/src/Artemis.UI/Artemis.UI.csproj index 10bac1436..18dab508a 100644 --- a/src/Artemis.UI/Artemis.UI.csproj +++ b/src/Artemis.UI/Artemis.UI.csproj @@ -24,7 +24,6 @@ - diff --git a/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml b/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml index 506c960d7..e29210098 100644 --- a/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml +++ b/src/Artemis.UI/Screens/Settings/Tabs/AboutTabView.axaml @@ -101,7 +101,7 @@ - Diogo 'DrMeteor' Trindade + Diogo Trindade Main contributor @@ -176,7 +176,6 @@ DryIoc FluentAvalonia EmbedIO - Furl.Http Humanizer LiteDB McMaster.NETCore.Plugins @@ -199,9 +198,6 @@ https://unosquare.github.io/embedio/ - - https://flurl.dev/ - https://github.com/Humanizr/Humanizer diff --git a/src/Artemis.UI/Screens/Workshop/CurrentUser/CurrentUserViewModel.cs b/src/Artemis.UI/Screens/Workshop/CurrentUser/CurrentUserViewModel.cs index a5dec1d4a..c17e40abe 100644 --- a/src/Artemis.UI/Screens/Workshop/CurrentUser/CurrentUserViewModel.cs +++ b/src/Artemis.UI/Screens/Workshop/CurrentUser/CurrentUserViewModel.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using System.Net.Http; using System.Reactive; using System.Reactive.Disposables; using System.Threading; @@ -10,7 +11,6 @@ using Artemis.WebClient.Workshop; using Artemis.WebClient.Workshop.Services; using Avalonia.Media.Imaging; using FluentAvalonia.UI.Controls; -using Flurl.Http; using PropertyChanged.SourceGenerator; using ReactiveUI; using Serilog; @@ -21,6 +21,7 @@ public partial class CurrentUserViewModel : ActivatableViewModelBase { private readonly IAuthenticationService _authenticationService; private readonly ObservableAsPropertyHelper _isAnonymous; + private readonly HttpClient _httpClient; private readonly ILogger _logger; private readonly IWindowService _windowService; [Notify] private bool _allowLogout = true; @@ -35,6 +36,7 @@ public partial class CurrentUserViewModel : ActivatableViewModelBase _logger = logger; _authenticationService = authenticationService; _windowService = windowService; + _httpClient = new HttpClient(); Login = ReactiveCommand.CreateFromTask(ExecuteLogin); _isAnonymous = this.WhenAnyValue(vm => vm.Loading, vm => vm.Name, (l, n) => l || n == null).ToProperty(this, vm => vm.IsAnonymous); @@ -106,7 +108,7 @@ public partial class CurrentUserViewModel : ActivatableViewModelBase try { Avatar?.Dispose(); - Avatar = new Bitmap(await $"{WorkshopConstants.AUTHORITY_URL}/user/avatar/{userId}".GetStreamAsync()); + Avatar = new Bitmap(await _httpClient.GetStreamAsync($"{WorkshopConstants.AUTHORITY_URL}/user/avatar/{userId}")); } catch (Exception) {