Sort users in ManageUserDisplay
This commit is contained in:
@@ -82,7 +82,7 @@ namespace Akari.Provider.WaveshareUART.Views
|
||||
|
||||
private void UpdateList()
|
||||
{
|
||||
_listView.SetSource(UsersManager.Users.ToList());
|
||||
_listView.SetSource(UsersManager.Users.OrderBy(u => u.Name).ToList());
|
||||
|
||||
_listView.SetFocus();
|
||||
}
|
||||
@@ -106,7 +106,7 @@ namespace Akari.Provider.WaveshareUART.Views
|
||||
|
||||
private void DeleteButton_Clicked()
|
||||
{
|
||||
var marked = UsersManager.Users.Where((_, index) => _listView.Source.IsMarked(index)).ToHashSet();
|
||||
var marked = _listView.Source.ToList().Cast<User>().Where((_, index) => _listView.Source.IsMarked(index)).ToHashSet();
|
||||
|
||||
if (MessageBox.Query("Delete Users", $"Do you really want to delete the {marked.Count} selected users?", "Yes", "No") != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user