[FIX] Check for UI_Use_Real_Name when sorting rooms (#2230)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Youssef Muhamad 2020-07-07 10:06:48 -03:00 committed by Diego Mello
parent f4118b6312
commit f15c755e03
1 changed files with 1 additions and 1 deletions

View File

@ -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']);
}