From 24c4feb4bc151556a0f3590ac0cc36fb0c63f32e Mon Sep 17 00:00:00 2001 From: sahin-a Date: Tue, 18 Apr 2023 21:06:48 +0200 Subject: [PATCH] currently logged in accounts now is the first entry in the list --- .../ViewModels/AccountSwitcherViewModel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SteamAccountManager.AvaloniaUI/ViewModels/AccountSwitcherViewModel.cs b/SteamAccountManager.AvaloniaUI/ViewModels/AccountSwitcherViewModel.cs index 331898a..292ba67 100644 --- a/SteamAccountManager.AvaloniaUI/ViewModels/AccountSwitcherViewModel.cs +++ b/SteamAccountManager.AvaloniaUI/ViewModels/AccountSwitcherViewModel.cs @@ -118,7 +118,8 @@ private async void AddAccount() await _switchAccountUseCase.Execute(string.Empty); } - private IEnumerable SortAccounts(Account[] accounts) => accounts.OrderByDescending(x => x.Rank.Level) + private IEnumerable SortAccounts(Account[] accounts) => accounts.OrderByDescending(x => x.IsLoggedIn) + .ThenByDescending(x => x.Rank.Level) .ThenBy(x => x.Name) .ThenBy(x => x.IsVacBanned);