[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 GitHub
parent 7c52e6eada
commit 20604c4695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -428,7 +428,7 @@ class RoomsListView extends React.Component {
let tempChats = []; let tempChats = [];
let chats = []; let chats = [];
if (sortBy === 'alphabetical') { if (sortBy === 'alphabetical') {
chats = orderBy(data, ['name'], ['asc']); chats = orderBy(data, [`${ this.useRealName ? 'fname' : 'name' }`], ['asc']);
} else { } else {
chats = orderBy(data, ['roomUpdatedAt'], ['desc']); chats = orderBy(data, ['roomUpdatedAt'], ['desc']);
} }