@@ -19,16 +19,13 @@ limitations under the License.
1919import React from 'react' ;
2020import PropTypes from 'prop-types' ;
2121import classNames from 'classnames' ;
22- import { DragDropContext } from 'react-beautiful-dnd' ;
2322import { MatrixClient } from 'matrix-js-sdk' ;
2423import { KeyCode } from 'matrix-react-sdk/lib/Keyboard' ;
2524import sdk from 'matrix-react-sdk' ;
2625import dis from 'matrix-react-sdk/lib/dispatcher' ;
2726import VectorConferenceHandler from '../../VectorConferenceHandler' ;
2827
2928import SettingsStore from 'matrix-react-sdk/lib/settings/SettingsStore' ;
30- import TagOrderActions from 'matrix-react-sdk/lib/actions/TagOrderActions' ;
31- import RoomListActions from 'matrix-react-sdk/lib/actions/RoomListActions' ;
3229
3330
3431var LeftPanel = React . createClass ( {
@@ -170,47 +167,6 @@ var LeftPanel = React.createClass({
170167 this . setState ( { searchFilter : term } ) ;
171168 } ,
172169
173- onDragEnd : function ( result ) {
174- // Dragged to an invalid destination, not onto a droppable
175- if ( ! result . destination ) {
176- return ;
177- }
178-
179- const dest = result . destination . droppableId ;
180-
181- if ( dest === 'tag-panel-droppable' ) {
182- // Dispatch synchronously so that the TagPanel receives an
183- // optimistic update from TagOrderStore before the previous
184- // state is shown.
185- dis . dispatch ( TagOrderActions . moveTag (
186- this . context . matrixClient ,
187- result . draggableId ,
188- result . destination . index ,
189- ) , true ) ;
190- } else {
191- this . onRoomTileEndDrag ( result ) ;
192- }
193- } ,
194-
195- onRoomTileEndDrag : function ( result ) {
196- let newTag = result . destination . droppableId . split ( '_' ) [ 1 ] ;
197- let prevTag = result . source . droppableId . split ( '_' ) [ 1 ] ;
198- if ( newTag === 'undefined' ) newTag = undefined ;
199- if ( prevTag === 'undefined' ) prevTag = undefined ;
200-
201- const roomId = result . draggableId . split ( '_' ) [ 1 ] ;
202-
203- const oldIndex = result . source . index ;
204- const newIndex = result . destination . index ;
205-
206- dis . dispatch ( RoomListActions . tagRoom (
207- this . context . matrixClient ,
208- this . context . matrixClient . getRoom ( roomId ) ,
209- prevTag , newTag ,
210- oldIndex , newIndex ,
211- ) , true ) ;
212- } ,
213-
214170 collectRoomList : function ( ref ) {
215171 this . _roomList = ref ;
216172 } ,
@@ -250,21 +206,19 @@ var LeftPanel = React.createClass({
250206 ) ;
251207
252208 return (
253- < DragDropContext onDragEnd = { this . onDragEnd } >
254- < div className = { containerClasses } >
255- { tagPanel }
256- < aside className = { classes } onKeyDown = { this . _onKeyDown } onFocus = { this . _onFocus } onBlur = { this . _onBlur } >
257- { topBox }
258- < CallPreview ConferenceHandler = { VectorConferenceHandler } />
259- < RoomList
260- ref = { this . collectRoomList }
261- collapsed = { this . props . collapsed }
262- searchFilter = { this . state . searchFilter }
263- ConferenceHandler = { VectorConferenceHandler } />
264- < BottomLeftMenu collapsed = { this . props . collapsed } />
265- </ aside >
266- </ div >
267- </ DragDropContext >
209+ < div className = { containerClasses } >
210+ { tagPanel }
211+ < aside className = { classes } onKeyDown = { this . _onKeyDown } onFocus = { this . _onFocus } onBlur = { this . _onBlur } >
212+ { topBox }
213+ < CallPreview ConferenceHandler = { VectorConferenceHandler } />
214+ < RoomList
215+ ref = { this . collectRoomList }
216+ collapsed = { this . props . collapsed }
217+ searchFilter = { this . state . searchFilter }
218+ ConferenceHandler = { VectorConferenceHandler } />
219+ < BottomLeftMenu collapsed = { this . props . collapsed } />
220+ </ aside >
221+ </ div >
268222 ) ;
269223 }
270224} ) ;
0 commit comments