refectored Drawer component and added Postie

This commit is contained in:
unknown
2021-08-30 21:12:24 +05:30
parent 8996b562bc
commit b5dfc337ec
10 changed files with 336 additions and 191 deletions

View File

@@ -0,0 +1,21 @@
import initMatrix from '../../../client/initMatrix';
function AtoZ(aId, bId) {
let aName = initMatrix.matrixClient.getRoom(aId).name;
let bName = initMatrix.matrixClient.getRoom(bId).name;
// remove "#" from the room name
// To ignore it in sorting
aName = aName.replaceAll('#', '');
bName = bName.replaceAll('#', '');
if (aName.toLowerCase() < bName.toLowerCase()) {
return -1;
}
if (aName.toLowerCase() > bName.toLowerCase()) {
return 1;
}
return 0;
}
export { AtoZ };