mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-10 17:20:28 +03:00
Added RoomOptions component (#25)
This commit is contained in:
parent
652f8227b5
commit
80551124f1
11 changed files with 322 additions and 3 deletions
|
|
@ -386,6 +386,7 @@ class RoomList extends EventEmitter {
|
|||
|
||||
const lastTimelineEvent = room.timeline[room.timeline.length - 1];
|
||||
if (lastTimelineEvent.getId() !== event.getId()) return;
|
||||
if (event.getSender() === this.matrixClient.getUserId()) return;
|
||||
this.emit(cons.events.roomList.EVENT_ARRIVED, room.roomId);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ const cons = {
|
|||
HOME: 'home',
|
||||
DIRECTS: 'dm',
|
||||
},
|
||||
notifs: {
|
||||
DEFAULT: 'default',
|
||||
ALL_MESSAGES: 'all_messages',
|
||||
MENTIONS_AND_KEYWORDS: 'mentions_and_keywords',
|
||||
MUTE: 'mute',
|
||||
},
|
||||
actions: {
|
||||
navigation: {
|
||||
SELECT_TAB: 'SELECT_TAB',
|
||||
|
|
@ -24,6 +30,7 @@ const cons = {
|
|||
OPEN_SETTINGS: 'OPEN_SETTINGS',
|
||||
OPEN_EMOJIBOARD: 'OPEN_EMOJIBOARD',
|
||||
OPEN_READRECEIPTS: 'OPEN_READRECEIPTS',
|
||||
OPEN_ROOMOPTIONS: 'OPEN_ROOMOPTIONS',
|
||||
},
|
||||
room: {
|
||||
JOIN: 'JOIN',
|
||||
|
|
@ -52,6 +59,7 @@ const cons = {
|
|||
SETTINGS_OPENED: 'SETTINGS_OPENED',
|
||||
EMOJIBOARD_OPENED: 'EMOJIBOARD_OPENED',
|
||||
READRECEIPTS_OPENED: 'READRECEIPTS_OPENED',
|
||||
ROOMOPTIONS_OPENED: 'ROOMOPTIONS_OPENED',
|
||||
},
|
||||
roomList: {
|
||||
ROOMLIST_UPDATED: 'ROOMLIST_UPDATED',
|
||||
|
|
|
|||
|
|
@ -85,6 +85,13 @@ class Navigation extends EventEmitter {
|
|||
action.eventId,
|
||||
);
|
||||
},
|
||||
[cons.actions.navigation.OPEN_ROOMOPTIONS]: () => {
|
||||
this.emit(
|
||||
cons.events.navigation.ROOMOPTIONS_OPENED,
|
||||
action.cords,
|
||||
action.roomId,
|
||||
);
|
||||
},
|
||||
};
|
||||
actions[action.type]?.();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue