@@ -29,9 +29,7 @@ import {aboveLeftOf, ContextMenu, ContextMenuTooltipButton, useContextMenu} from
2929import AccessibleTooltipButton from "../elements/AccessibleTooltipButton" ;
3030import ReplyPreview from "./ReplyPreview" ;
3131import { UIFeature } from "../../../settings/UIFeature" ;
32- import WidgetStore from "../../../stores/WidgetStore" ;
3332import { UPDATE_EVENT } from "../../../stores/AsyncStore" ;
34- import ActiveWidgetStore from "../../../stores/ActiveWidgetStore" ;
3533import { replaceableComponent } from "../../../utils/replaceableComponent" ;
3634import VoiceRecordComposerTile from "./VoiceRecordComposerTile" ;
3735import { VoiceRecordingStore } from "../../../stores/VoiceRecordingStore" ;
@@ -179,16 +177,12 @@ export default class MessageComposer extends React.Component {
179177 this . _onRoomStateEvents = this . _onRoomStateEvents . bind ( this ) ;
180178 this . _onTombstoneClick = this . _onTombstoneClick . bind ( this ) ;
181179 this . renderPlaceholderText = this . renderPlaceholderText . bind ( this ) ;
182- WidgetStore . instance . on ( UPDATE_EVENT , this . _onWidgetUpdate ) ;
183- ActiveWidgetStore . on ( 'update' , this . _onActiveWidgetUpdate ) ;
184180 VoiceRecordingStore . instance . on ( UPDATE_EVENT , this . _onVoiceStoreUpdate ) ;
185181 this . _dispatcherRef = null ;
186182
187183 this . state = {
188184 tombstone : this . _getRoomTombstone ( ) ,
189185 canSendMessages : this . props . room . maySendMessage ( ) ,
190- hasConference : WidgetStore . instance . doesRoomHaveConference ( this . props . room ) ,
191- joinedConference : WidgetStore . instance . isJoinedToConferenceIn ( this . props . room ) ,
192186 isComposerEmpty : true ,
193187 haveRecording : false ,
194188 } ;
@@ -206,14 +200,6 @@ export default class MessageComposer extends React.Component {
206200 }
207201 } ;
208202
209- _onWidgetUpdate = ( ) => {
210- this . setState ( { hasConference : WidgetStore . instance . doesRoomHaveConference ( this . props . room ) } ) ;
211- } ;
212-
213- _onActiveWidgetUpdate = ( ) => {
214- this . setState ( { joinedConference : WidgetStore . instance . isJoinedToConferenceIn ( this . props . room ) } ) ;
215- } ;
216-
217203 componentDidMount ( ) {
218204 this . dispatcherRef = dis . register ( this . onAction ) ;
219205 MatrixClientPeg . get ( ) . on ( "RoomState.events" , this . _onRoomStateEvents ) ;
@@ -240,8 +226,6 @@ export default class MessageComposer extends React.Component {
240226 if ( MatrixClientPeg . get ( ) ) {
241227 MatrixClientPeg . get ( ) . removeListener ( "RoomState.events" , this . _onRoomStateEvents ) ;
242228 }
243- WidgetStore . instance . removeListener ( UPDATE_EVENT , this . _onWidgetUpdate ) ;
244- ActiveWidgetStore . removeListener ( 'update' , this . _onActiveWidgetUpdate ) ;
245229 VoiceRecordingStore . instance . off ( UPDATE_EVENT , this . _onVoiceStoreUpdate ) ;
246230 dis . unregister ( this . dispatcherRef ) ;
247231 }
0 commit comments