fix lint
This commit is contained in:
parent
39289e57ac
commit
7b6c863377
2 changed files with 15 additions and 11 deletions
|
@ -16,7 +16,6 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import OpenRoomsStore from '../../stores/OpenRoomsStore';
|
import OpenRoomsStore from '../../stores/OpenRoomsStore';
|
||||||
import dis from '../../dispatcher';
|
import dis from '../../dispatcher';
|
||||||
import RoomView from './RoomView';
|
import RoomView from './RoomView';
|
||||||
|
@ -114,13 +113,17 @@ export default class RoomGridView extends React.Component {
|
||||||
"mx_GroupGridView_tile": true,
|
"mx_GroupGridView_tile": true,
|
||||||
"mx_GroupGridView_activeTile": isActive,
|
"mx_GroupGridView_activeTile": isActive,
|
||||||
});
|
});
|
||||||
return (<section onClick={() => {this._setActive(i)}} key={roomStore.getRoomId()} className={tileClasses}>
|
return (<section
|
||||||
<RoomView
|
onClick={() => {this._setActive(i);}}
|
||||||
isGrid={true}
|
key={roomStore.getRoomId()}
|
||||||
roomViewStore={roomStore}
|
className={tileClasses}
|
||||||
isActive={isActive}
|
>
|
||||||
/>
|
<RoomView
|
||||||
</section>);
|
isGrid={true}
|
||||||
|
roomViewStore={roomStore}
|
||||||
|
isActive={isActive}
|
||||||
|
/>
|
||||||
|
</section>);
|
||||||
} else {
|
} else {
|
||||||
return (<section className={"mx_GroupGridView_emptyTile"} key={`empty-${i}`} />);
|
return (<section className={"mx_GroupGridView_emptyTile"} key={`empty-${i}`} />);
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,7 @@ class OpenRoomsStore extends Store {
|
||||||
auto_join: payload.auto_join,
|
auto_join: payload.auto_join,
|
||||||
oob_data: payload.oob_data,
|
oob_data: payload.oob_data,
|
||||||
});
|
});
|
||||||
} catch(err) {
|
} catch (err) {
|
||||||
this._forwardAction({
|
this._forwardAction({
|
||||||
action: 'view_room_error',
|
action: 'view_room_error',
|
||||||
room_id: null,
|
room_id: null,
|
||||||
|
@ -223,6 +223,7 @@ class OpenRoomsStore extends Store {
|
||||||
}
|
}
|
||||||
|
|
||||||
__onDispatch(payload) {
|
__onDispatch(payload) {
|
||||||
|
let proposedIndex;
|
||||||
switch (payload.action) {
|
switch (payload.action) {
|
||||||
// view_room:
|
// view_room:
|
||||||
// - room_alias: '#somealias:matrix.org'
|
// - room_alias: '#somealias:matrix.org'
|
||||||
|
@ -253,10 +254,10 @@ class OpenRoomsStore extends Store {
|
||||||
this._forwardingEvent = payload.event;
|
this._forwardingEvent = payload.event;
|
||||||
break;
|
break;
|
||||||
case 'group_grid_set_active':
|
case 'group_grid_set_active':
|
||||||
const proposedIndex = this._roomIndex(payload);
|
proposedIndex = this._roomIndex(payload);
|
||||||
if (proposedIndex !== -1) {
|
if (proposedIndex !== -1) {
|
||||||
this._setState({
|
this._setState({
|
||||||
currentIndex: proposedIndex
|
currentIndex: proposedIndex,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue