fix PR feedback

This commit is contained in:
Bruno Windels 2019-01-09 12:48:13 +01:00
parent 9e67dbf008
commit 254427461d
8 changed files with 21 additions and 22 deletions

View file

@ -18,6 +18,7 @@ limitations under the License.
import React from 'react';
import OpenRoomsStore from '../../stores/OpenRoomsStore';
import dis from '../../dispatcher';
import {_t} from '../../languageHandler';
import RoomView from './RoomView';
import classNames from 'classnames';
import MainSplit from './MainSplit';
@ -48,7 +49,6 @@ export default class RoomGridView extends React.Component {
componentWillMount() {
this._unmounted = false;
this._openRoomsStoreRegistration = OpenRoomsStore.addListener(this.onRoomsChanged);
this._dispatcherRef = dis.register(this._onAction);
}
componentWillUnmount() {
@ -56,7 +56,6 @@ export default class RoomGridView extends React.Component {
if (this._openRoomsStoreRegistration) {
this._openRoomsStoreRegistration.remove();
}
dis.unregister(this._dispatcherRef);
}
onRoomsChanged() {
@ -67,13 +66,6 @@ export default class RoomGridView extends React.Component {
});
}
_onAction(payload) {
switch (payload.action) {
default:
break;
}
}
_setActive(i) {
const store = OpenRoomsStore.getRoomStoreAt(i);
if (store !== this.state.activeRoomStore) {
@ -125,7 +117,7 @@ export default class RoomGridView extends React.Component {
/>
</section>);
} else {
return (<section className={"mx_GroupGridView_emptyTile"} key={`empty-${i}`} />);
return (<section className={"mx_GroupGridView_emptyTile"} key={`empty-${i}`}>{_t("No room in this tile yet.")}</section>);
}
}) }
</div>

View file

@ -356,9 +356,6 @@ export default class MessageComposerInput extends React.Component {
componentWillMount() {
this.dispatcherRef = this.props.roomViewStore.getDispatcher().register(this.onAction);
if (this.props.isGrid) {
this.historyManager = new NoopHistoryManager();
} else {
this.historyManager = new ComposerHistoryManager(this.props.room.roomId, 'mx_slate_composer_history_');

View file

@ -1406,5 +1406,6 @@
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room",
"View as Grid": "View as Grid",
"Allow up to 6 rooms in a community to be shown simultaneously in a grid via the context menu": "Allow up to 6 rooms in a community to be shown simultaneously in a grid via the context menu"
"Allow up to 6 rooms in a community to be shown simultaneously in a grid via the context menu": "Allow up to 6 rooms in a community to be shown simultaneously in a grid via the context menu",
"No room in this tile yet.": "No room in this tile yet."
}

View file

@ -307,6 +307,6 @@ export class RoomViewStore extends Store {
}
const MatrixDispatcher = require("../matrix-dispatcher");
const blubber = new RoomViewStore(new MatrixDispatcher());
const backwardsCompatInstance = new RoomViewStore(new MatrixDispatcher());
export default blubber;
export default backwardsCompatInstance;