From 7ad7b489b099b650279393af8cb4562e54af2710 Mon Sep 17 00:00:00 2001 From: esainane Date: Wed, 4 Dec 2019 14:38:54 +1300 Subject: [PATCH] Fix UserListPanel sorting Offline users have a nil isAdmin, non-admins have a false isAdmin. This caused comparisons to often enter the admin branch prematurely, breaking alphabetical etc ordering. --- LuaMenu/widgets/chobby/components/user_list_panel.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaMenu/widgets/chobby/components/user_list_panel.lua b/LuaMenu/widgets/chobby/components/user_list_panel.lua index 713c87a67..50beabd58 100644 --- a/LuaMenu/widgets/chobby/components/user_list_panel.lua +++ b/LuaMenu/widgets/chobby/components/user_list_panel.lua @@ -71,7 +71,7 @@ local function CompareUsers(userName, otherName) return true end - if otherData.isAdmin ~= userData.isAdmin then + if (not not otherData.isAdmin) ~= (not not userData.isAdmin) then return userData.isAdmin end