fix (some) lint warnings

This commit is contained in:
Bruno Windels 2019-01-07 16:33:23 +01:00
parent c2f6fc381c
commit aedc220b62
3 changed files with 9 additions and 12 deletions

View file

@ -25,7 +25,6 @@ import RightPanel from './RightPanel';
import RoomHeaderButtons from '../views/right_panel/RoomHeaderButtons';
export default class RoomGridView extends React.Component {
constructor(props) {
super(props);
this.state = {
@ -132,5 +131,4 @@ export default class RoomGridView extends React.Component {
</MainSplit>
</main>);
}
}

View file

@ -98,18 +98,18 @@ class OpenRoomsStore extends Store {
});
}
_createOpenRoom(room_id, room_alias) {
_createOpenRoom(roomId, roomAlias) {
const dispatcher = new MatrixDispatcher();
// forward all actions coming from the room dispatcher
// to the global one
const dispatcherRef = dispatcher.register((payload) => {
// block a view_room action for the same room because it will switch to
// single room mode in MatrixChat
if (payload.action === 'view_room' && room_id === payload.room_id) {
if (payload.action === 'view_room' && roomId === payload.room_id) {
return;
}
payload.grid_src_room_id = room_id;
payload.grid_src_room_alias = room_alias;
payload.grid_src_room_id = roomId;
payload.grid_src_room_alias = roomAlias;
this.getDispatcher().dispatch(payload);
});
const openRoom = {
@ -120,8 +120,8 @@ class OpenRoomsStore extends Store {
dispatcher.dispatch({
action: 'view_room',
room_id: room_id,
room_alias: room_alias,
room_id: roomId,
room_alias: roomAlias,
}, true);
return openRoom;
@ -134,16 +134,16 @@ class OpenRoomsStore extends Store {
});
}
_setGroupOpenRooms(group_id) {
_setGroupOpenRooms(groupId) {
this._cleanupOpenRooms();
// TODO: register to GroupStore updates
const rooms = GroupStore.getGroupRooms(group_id);
const rooms = GroupStore.getGroupRooms(groupId);
const openRooms = rooms.map((room) => {
return this._createOpenRoom(room.roomId);
});
this._setState({
rooms: openRooms,
group_id: group_id,
group_id: groupId,
currentIndex: 0,
});
}

View file

@ -26,7 +26,6 @@ Once a timer is finished or aborted, it can't be started again
a new one through `clone()` or `cloneIfRun()`.
*/
export default class Timer {
constructor(timeout) {
this._timeout = timeout;
this._onTimeout = this._onTimeout.bind(this);