mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 22:14:58 +08:00
RoomView: Display AppsDrawer if apps in room state
This commit is contained in:
parent
9e0b476b72
commit
99b1de7f0e
@ -251,12 +251,18 @@ module.exports = React.createClass({
|
||||
} else if (isUserJoined) {
|
||||
MatrixClientPeg.get().stopPeeking();
|
||||
this.setState({
|
||||
showApps: this._shouldShowApps(room),
|
||||
unsentMessageError: this._getUnsentMessageError(room),
|
||||
});
|
||||
this._onRoomLoaded(room);
|
||||
}
|
||||
},
|
||||
|
||||
_shouldShowApps: function(room) {
|
||||
const appsStateEvents = room.currentState.getStateEvents('im.vector.modular.widgets', '');
|
||||
return appsStateEvents && Object.keys(appsStateEvents.getContent()).length > 0;
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
var call = this._getCallForRoom();
|
||||
var callState = call ? call.call_state : "ended";
|
||||
|
Loading…
Reference in New Issue
Block a user