Skip to content

Commit

Permalink
emoji fix progress to rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
JasminDreasond committed Aug 11, 2023
1 parent 11c3c0b commit b7b18aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/app/organisms/emoji-board/EmojiBoard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,14 @@ function EmojiBoard({ onSelect, searchRef, emojiBoardRef, scrollEmojisRef }) {
if (eventType === 'im.ponies.emote_rooms' || eventType === 'im.ponies.user_emotes') forceUpdate();
};

const handleEvent2 = () => handleEvent({ getType: () => ({ eventType: 'im.ponies.user_emotes' }) });
const handleEvent2 = () => {
handleEvent({
getType: () => {
const tinyData = { eventType: 'im.ponies.user_emotes' };
return tinyData;
}
})
};
const updateAvailableEmoji = async (newRoomId) => setSelectedRoomId(newRoomId);

const onOpen = (roomId, cords, requestEmojiCallback, dom) => {
Expand Down
3 changes: 2 additions & 1 deletion src/client/state/RoomList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import EventEmitter from 'events';
import appDispatcher from '../dispatcher';
import cons from './cons';
import { updateEmojiListData } from '../action/navigation';

function isMEventSpaceChild(mEvent) {
return mEvent.getType() === 'm.space.child' && Object.keys(mEvent.getContent()).length > 0;
Expand Down Expand Up @@ -319,7 +320,7 @@ class RoomList extends EventEmitter {
}

if (mEvent.getType() === 'im.ponies.room_emotes') {
this.emit(cons.events.navigation.UPDATED_EMOJI_LIST_DATA, state.roomId);
updateEmojiListData(state.roomId);
}

});
Expand Down

0 comments on commit b7b18aa

Please sign in to comment.