Skip to content

Commit bea6408

Browse files
committed
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
1 parent 567176e commit bea6408

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

‎src/skins/vector/views/organisms/LeftPanel.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ limitations under the License.
1717
'use strict';
1818

1919
var React = require('react');
20+
var DragDropContext = require('react-dnd').DragDropContext;
21+
var HTML5Backend = require('react-dnd/modules/backends/HTML5');
2022
var sdk = require('matrix-react-sdk')
2123
var dis = require('matrix-react-sdk/lib/dispatcher');
2224

2325
var CallHandler = require("matrix-react-sdk/lib/CallHandler");
2426

25-
module.exports = React.createClass({
27+
var LeftPanel = React.createClass({
2628
displayName: 'LeftPanel',
2729

2830
getInitialState: function() {
@@ -114,3 +116,4 @@ module.exports = React.createClass({
114116
}
115117
});
116118

119+
module.exports = DragDropContext(HTML5Backend)(LeftPanel);

‎src/skins/vector/views/pages/MatrixChat.js‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ limitations under the License.
1717
'use strict';
1818

1919
var React = require('react');
20-
var DragDropContext = require('react-dnd').DragDropContext;
21-
var HTML5Backend = require('react-dnd/modules/backends/HTML5');
2220
var sdk = require('matrix-react-sdk')
2321

2422
var MatrixChatController = require('matrix-react-sdk/lib/controllers/pages/MatrixChat')
@@ -27,7 +25,7 @@ var dis = require('matrix-react-sdk/lib/dispatcher');
2725
var Matrix = require("matrix-js-sdk");
2826
var ContextualMenu = require("../../../../ContextualMenu");
2927

30-
var MatrixChat = React.createClass({
28+
module.exports = React.createClass({
3129
displayName: 'MatrixChat',
3230
mixins: [MatrixChatController],
3331

@@ -171,6 +169,4 @@ var MatrixChat = React.createClass({
171169
);
172170
}
173171
}
174-
});
175-
176-
module.exports = DragDropContext(HTML5Backend)(MatrixChat);
172+
});

0 commit comments

Comments
 (0)