fix (some) lint warnings

pull/21833/head
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'; import RoomHeaderButtons from '../views/right_panel/RoomHeaderButtons';
export default class RoomGridView extends React.Component { export default class RoomGridView extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
@ -132,5 +131,4 @@ export default class RoomGridView extends React.Component {
</MainSplit> </MainSplit>
</main>); </main>);
} }
} }

View File

@ -98,18 +98,18 @@ class OpenRoomsStore extends Store {
}); });
} }
_createOpenRoom(room_id, room_alias) { _createOpenRoom(roomId, roomAlias) {
const dispatcher = new MatrixDispatcher(); const dispatcher = new MatrixDispatcher();
// forward all actions coming from the room dispatcher // forward all actions coming from the room dispatcher
// to the global one // to the global one
const dispatcherRef = dispatcher.register((payload) => { const dispatcherRef = dispatcher.register((payload) => {
// block a view_room action for the same room because it will switch to // block a view_room action for the same room because it will switch to
// single room mode in MatrixChat // 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; return;
} }
payload.grid_src_room_id = room_id; payload.grid_src_room_id = roomId;
payload.grid_src_room_alias = room_alias; payload.grid_src_room_alias = roomAlias;
this.getDispatcher().dispatch(payload); this.getDispatcher().dispatch(payload);
}); });
const openRoom = { const openRoom = {
@ -120,8 +120,8 @@ class OpenRoomsStore extends Store {
dispatcher.dispatch({ dispatcher.dispatch({
action: 'view_room', action: 'view_room',
room_id: room_id, room_id: roomId,
room_alias: room_alias, room_alias: roomAlias,
}, true); }, true);
return openRoom; return openRoom;
@ -134,16 +134,16 @@ class OpenRoomsStore extends Store {
}); });
} }
_setGroupOpenRooms(group_id) { _setGroupOpenRooms(groupId) {
this._cleanupOpenRooms(); this._cleanupOpenRooms();
// TODO: register to GroupStore updates // TODO: register to GroupStore updates
const rooms = GroupStore.getGroupRooms(group_id); const rooms = GroupStore.getGroupRooms(groupId);
const openRooms = rooms.map((room) => { const openRooms = rooms.map((room) => {
return this._createOpenRoom(room.roomId); return this._createOpenRoom(room.roomId);
}); });
this._setState({ this._setState({
rooms: openRooms, rooms: openRooms,
group_id: group_id, group_id: groupId,
currentIndex: 0, 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()`. a new one through `clone()` or `cloneIfRun()`.
*/ */
export default class Timer { export default class Timer {
constructor(timeout) { constructor(timeout) {
this._timeout = timeout; this._timeout = timeout;
this._onTimeout = this._onTimeout.bind(this); this._onTimeout = this._onTimeout.bind(this);