mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-12 16:37:51 +03:00
Use function syntax
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
10e42d4d48
commit
f2dccbc9f7
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ import { EffectiveMembership, getEffectiveMembership } from "../../../../utils/m
|
||||||
import { EventType } from "matrix-js-sdk/src/@types/event";
|
import { EventType } from "matrix-js-sdk/src/@types/event";
|
||||||
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||||
|
|
||||||
const ignoreSelfEvent = (event: MatrixEvent): boolean => {
|
export function ignoreSelfEvent(event: MatrixEvent): boolean {
|
||||||
const type = event.getType();
|
const type = event.getType();
|
||||||
const content = event.getContent();
|
const content = event.getContent();
|
||||||
const prevContent = event.getPrevContent();
|
const prevContent = event.getPrevContent();
|
||||||
|
@ -38,7 +38,7 @@ const ignoreSelfEvent = (event: MatrixEvent): boolean => {
|
||||||
if (type === EventType.RoomMember && prevContent.displayname !== content.displayname) return true;
|
if (type === EventType.RoomMember && prevContent.displayname !== content.displayname) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
}
|
||||||
|
|
||||||
export const sortRooms = (rooms: Room[]): Room[] => {
|
export const sortRooms = (rooms: Room[]): Room[] => {
|
||||||
// We cache the timestamp lookup to avoid iterating forever on the timeline
|
// We cache the timestamp lookup to avoid iterating forever on the timeline
|
||||||
|
|
Loading…
Reference in a new issue