Revert "Use ignoreSelfEvent in the RoomListStore (which doesn't work!)"
This reverts commit 0a4a1506d4
.
This commit is contained in:
parent
0a4a1506d4
commit
b7df1127bd
2 changed files with 4 additions and 5 deletions
|
@ -38,7 +38,6 @@ import { SpaceWatcher } from "./SpaceWatcher";
|
|||
import SpaceStore from "../SpaceStore";
|
||||
import { Action } from "../../dispatcher/actions";
|
||||
import { SettingUpdatedPayload } from "../../dispatcher/payloads/SettingUpdatedPayload";
|
||||
import { ignoreSelfEvent } from "./algorithms/tag-sorting/RecentAlgorithm";
|
||||
|
||||
interface IState {
|
||||
tagsEnabled?: boolean;
|
||||
|
@ -271,9 +270,6 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> {
|
|||
// Ignore non-live events (backfill)
|
||||
if (!eventPayload.isLiveEvent || !payload.isLiveUnfilteredRoomTimelineEvent) return;
|
||||
|
||||
// Avoid re-ordering on status, profile etc. changes
|
||||
if (ignoreSelfEvent(eventPayload.event)) return;
|
||||
|
||||
const roomId = eventPayload.event.getRoomId();
|
||||
const room = this.matrixClient.getRoom(roomId);
|
||||
const tryUpdate = async (updatedRoom: Room) => {
|
||||
|
|
|
@ -87,7 +87,10 @@ export const sortRooms = (rooms: Room[]): Room[] => {
|
|||
const ev = r.timeline[i];
|
||||
if (!ev.getTs()) continue; // skip events that don't have timestamps (tests only?)
|
||||
|
||||
if (ev.getSender() === myUserId || Unread.eventTriggersUnreadCount(ev)) {
|
||||
if (
|
||||
(ev.getSender() === myUserId && !ignoreSelfEvent(ev)) ||
|
||||
Unread.eventTriggersUnreadCount(ev)
|
||||
) {
|
||||
return ev.getTs();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue