put the DragDropContext on LeftPanel rather than MatrixChat to allow index.js to continue to abuse MatrixChat by directly invoking the showScreen method on it

This commit is contained in:
Matthew Hodgson 2015-11-09 15:44:08 +00:00
parent 567176ea6c
commit bea64082a9
2 changed files with 6 additions and 7 deletions

View File

@ -17,12 +17,14 @@ limitations under the License.
'use strict';
var React = require('react');
var DragDropContext = require('react-dnd').DragDropContext;
var HTML5Backend = require('react-dnd/modules/backends/HTML5');
var sdk = require('matrix-react-sdk')
var dis = require('matrix-react-sdk/lib/dispatcher');
var CallHandler = require("matrix-react-sdk/lib/CallHandler");
module.exports = React.createClass({
var LeftPanel = React.createClass({
displayName: 'LeftPanel',
getInitialState: function() {
@ -114,3 +116,4 @@ module.exports = React.createClass({
}
});
module.exports = DragDropContext(HTML5Backend)(LeftPanel);

View File

@ -17,8 +17,6 @@ limitations under the License.
'use strict';
var React = require('react');
var DragDropContext = require('react-dnd').DragDropContext;
var HTML5Backend = require('react-dnd/modules/backends/HTML5');
var sdk = require('matrix-react-sdk')
var MatrixChatController = require('matrix-react-sdk/lib/controllers/pages/MatrixChat')
@ -27,7 +25,7 @@ var dis = require('matrix-react-sdk/lib/dispatcher');
var Matrix = require("matrix-js-sdk");
var ContextualMenu = require("../../../../ContextualMenu");
var MatrixChat = React.createClass({
module.exports = React.createClass({
displayName: 'MatrixChat',
mixins: [MatrixChatController],
@ -171,6 +169,4 @@ var MatrixChat = React.createClass({
);
}
}
});
module.exports = DragDropContext(HTML5Backend)(MatrixChat);
});