EventIndexPanel: Fix the removal of the updateCurrentRoom listeners.

The event listeners that update the current room and try to get the
current stats from the event index don't seem to be unmounted because
this != this confusion.

Turning them into arrow methods of the react class fixes this.
This commit is contained in:
Damir Jelić 2020-02-18 11:46:42 +01:00
parent 2dd093de49
commit 9e3b0fdf7c

View file

@ -46,7 +46,7 @@ export default class ManageEventIndexDialog extends React.Component {
}; };
} }
updateCurrentRoom = async (room) => { updateCurrentRoom = async(room) => {
const eventIndex = EventIndexPeg.get(); const eventIndex = EventIndexPeg.get();
const stats = await eventIndex.getStats(); const stats = await eventIndex.getStats();
let currentRoom = null; let currentRoom = null;