From f15c755e03137db26bedee20ac9db593f4b133f2 Mon Sep 17 00:00:00 2001 From: Youssef Muhamad Date: Tue, 7 Jul 2020 10:06:48 -0300 Subject: [PATCH] [FIX] Check for UI_Use_Real_Name when sorting rooms (#2230) Co-authored-by: Diego Mello --- app/views/RoomsListView/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/RoomsListView/index.js b/app/views/RoomsListView/index.js index 39b035e6f..5b1d396d3 100644 --- a/app/views/RoomsListView/index.js +++ b/app/views/RoomsListView/index.js @@ -411,7 +411,7 @@ class RoomsListView extends React.Component { let tempChats = []; let chats = []; if (sortBy === 'alphabetical') { - chats = orderBy(data, ['name'], ['asc']); + chats = orderBy(data, [`${ this.useRealName ? 'fname' : 'name' }`], ['asc']); } else { chats = orderBy(data, ['roomUpdatedAt'], ['desc']); }