Merge pull request #1711 from matrix-org/luke/roomlist-beautiful-dnd

Swap RoomList to react-beautiful-dnd
This commit is contained in:
Luke Barnard 2018-01-19 14:49:49 +00:00 committed by GitHub
commit a8320fe7e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 218 additions and 139 deletions

View file

@ -19,8 +19,6 @@ limitations under the License.
import * as Matrix from 'matrix-js-sdk';
import React from 'react';
import PropTypes from 'prop-types';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import { KeyCode, isOnlyCtrlOrCmdKeyEvent } from '../../Keyboard';
import Notifier from '../../Notifier';
@ -347,4 +345,4 @@ const LoggedInView = React.createClass({
},
});
export default DragDropContext(HTML5Backend)(LoggedInView);
export default LoggedInView;

View file

@ -1066,10 +1066,10 @@ export default React.createClass({
// this if we are not scrolled up in the view. To find out, delegate to
// the timeline panel. If the timeline panel doesn't exist, then we assume
// it is safe to reset the timeline.
if (!self._loggedInView) {
if (!self._loggedInView || !self._loggedInView.child) {
return true;
}
return self._loggedInView.getDecoratedComponentInstance().canResetTimelineInRoom(roomId);
return self._loggedInView.child.canResetTimelineInRoom(roomId);
});
cli.on('sync', function(state, prevState) {