Remove references to tabComplete, which are now redundant
(since the old composer has been removed)
This commit is contained in:
parent
0e12e384cb
commit
04dd98e6e9
4 changed files with 1 additions and 44 deletions
|
@ -33,9 +33,6 @@ module.exports = React.createClass({
|
||||||
// the room this statusbar is representing.
|
// the room this statusbar is representing.
|
||||||
room: React.PropTypes.object.isRequired,
|
room: React.PropTypes.object.isRequired,
|
||||||
|
|
||||||
// a TabComplete object
|
|
||||||
tabComplete: React.PropTypes.object.isRequired,
|
|
||||||
|
|
||||||
// the number of messages which have arrived since we've been scrolled up
|
// the number of messages which have arrived since we've been scrolled up
|
||||||
numUnreadMessages: React.PropTypes.number,
|
numUnreadMessages: React.PropTypes.number,
|
||||||
|
|
||||||
|
@ -143,12 +140,9 @@ module.exports = React.createClass({
|
||||||
(this.state.usersTyping.length > 0) ||
|
(this.state.usersTyping.length > 0) ||
|
||||||
this.props.numUnreadMessages ||
|
this.props.numUnreadMessages ||
|
||||||
!this.props.atEndOfLiveTimeline ||
|
!this.props.atEndOfLiveTimeline ||
|
||||||
this.props.hasActiveCall ||
|
this.props.hasActiveCall
|
||||||
this.props.tabComplete.isTabCompleting()
|
|
||||||
) {
|
) {
|
||||||
return STATUS_BAR_EXPANDED;
|
return STATUS_BAR_EXPANDED;
|
||||||
} else if (this.props.tabCompleteEntries) {
|
|
||||||
return STATUS_BAR_HIDDEN;
|
|
||||||
} else if (this.props.unsentMessageError) {
|
} else if (this.props.unsentMessageError) {
|
||||||
return STATUS_BAR_EXPANDED_LARGE;
|
return STATUS_BAR_EXPANDED_LARGE;
|
||||||
}
|
}
|
||||||
|
@ -237,8 +231,6 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
// return suitable content for the main (text) part of the status bar.
|
// return suitable content for the main (text) part of the status bar.
|
||||||
_getContent: function() {
|
_getContent: function() {
|
||||||
var TabCompleteBar = sdk.getComponent('rooms.TabCompleteBar');
|
|
||||||
var TintableSvg = sdk.getComponent("elements.TintableSvg");
|
|
||||||
const EmojiText = sdk.getComponent('elements.EmojiText');
|
const EmojiText = sdk.getComponent('elements.EmojiText');
|
||||||
|
|
||||||
// no conn bar trumps unread count since you can't get unread messages
|
// no conn bar trumps unread count since you can't get unread messages
|
||||||
|
@ -259,20 +251,6 @@ module.exports = React.createClass({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.tabComplete.isTabCompleting()) {
|
|
||||||
return (
|
|
||||||
<div className="mx_RoomStatusBar_tabCompleteBar">
|
|
||||||
<div className="mx_RoomStatusBar_tabCompleteWrapper">
|
|
||||||
<TabCompleteBar tabComplete={this.props.tabComplete} />
|
|
||||||
<div className="mx_RoomStatusBar_tabCompleteEol" title="->|">
|
|
||||||
<TintableSvg src="img/eol.svg" width="22" height="16"/>
|
|
||||||
{_t('Auto-complete')}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.props.unsentMessageError) {
|
if (this.props.unsentMessageError) {
|
||||||
return (
|
return (
|
||||||
<div className="mx_RoomStatusBar_connectionLostBar">
|
<div className="mx_RoomStatusBar_connectionLostBar">
|
||||||
|
|
|
@ -33,7 +33,6 @@ var ContentMessages = require("../../ContentMessages");
|
||||||
var Modal = require("../../Modal");
|
var Modal = require("../../Modal");
|
||||||
var sdk = require('../../index');
|
var sdk = require('../../index');
|
||||||
var CallHandler = require('../../CallHandler');
|
var CallHandler = require('../../CallHandler');
|
||||||
var TabComplete = require("../../TabComplete");
|
|
||||||
var Resend = require("../../Resend");
|
var Resend = require("../../Resend");
|
||||||
var dis = require("../../dispatcher");
|
var dis = require("../../dispatcher");
|
||||||
var Tinter = require("../../Tinter");
|
var Tinter = require("../../Tinter");
|
||||||
|
@ -144,15 +143,6 @@ module.exports = React.createClass({
|
||||||
MatrixClientPeg.get().on("RoomMember.membership", this.onRoomMemberMembership);
|
MatrixClientPeg.get().on("RoomMember.membership", this.onRoomMemberMembership);
|
||||||
MatrixClientPeg.get().on("accountData", this.onAccountData);
|
MatrixClientPeg.get().on("accountData", this.onAccountData);
|
||||||
|
|
||||||
this.tabComplete = new TabComplete({
|
|
||||||
allowLooping: false,
|
|
||||||
autoEnterTabComplete: true,
|
|
||||||
onClickCompletes: true,
|
|
||||||
onStateChange: (isCompleting) => {
|
|
||||||
this.forceUpdate();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// Start listening for RoomViewStore updates
|
// Start listening for RoomViewStore updates
|
||||||
this._roomStoreToken = RoomViewStore.addListener(this._onRoomViewStoreUpdate);
|
this._roomStoreToken = RoomViewStore.addListener(this._onRoomViewStoreUpdate);
|
||||||
this._onRoomViewStoreUpdate(true);
|
this._onRoomViewStoreUpdate(true);
|
||||||
|
@ -518,7 +508,6 @@ module.exports = React.createClass({
|
||||||
// update the tab complete list as it depends on who most recently spoke,
|
// update the tab complete list as it depends on who most recently spoke,
|
||||||
// and that has probably just changed
|
// and that has probably just changed
|
||||||
if (ev.sender) {
|
if (ev.sender) {
|
||||||
this.tabComplete.onMemberSpoke(ev.sender);
|
|
||||||
UserProvider.getInstance().onUserSpoke(ev.sender);
|
UserProvider.getInstance().onUserSpoke(ev.sender);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -542,7 +531,6 @@ module.exports = React.createClass({
|
||||||
this._warnAboutEncryption(room);
|
this._warnAboutEncryption(room);
|
||||||
this._calculatePeekRules(room);
|
this._calculatePeekRules(room);
|
||||||
this._updatePreviewUrlVisibility(room);
|
this._updatePreviewUrlVisibility(room);
|
||||||
this.tabComplete.loadEntries(room);
|
|
||||||
UserProvider.getInstance().setUserListFromRoom(room);
|
UserProvider.getInstance().setUserListFromRoom(room);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -719,7 +707,6 @@ module.exports = React.createClass({
|
||||||
this._updateConfCallNotification();
|
this._updateConfCallNotification();
|
||||||
|
|
||||||
// refresh the tab complete list
|
// refresh the tab complete list
|
||||||
this.tabComplete.loadEntries(this.state.room);
|
|
||||||
UserProvider.getInstance().setUserListFromRoom(this.state.room);
|
UserProvider.getInstance().setUserListFromRoom(this.state.room);
|
||||||
|
|
||||||
// if we are now a member of the room, where we were not before, that
|
// if we are now a member of the room, where we were not before, that
|
||||||
|
@ -1572,7 +1559,6 @@ module.exports = React.createClass({
|
||||||
isStatusAreaExpanded = this.state.statusBarVisible;
|
isStatusAreaExpanded = this.state.statusBarVisible;
|
||||||
statusBar = <RoomStatusBar
|
statusBar = <RoomStatusBar
|
||||||
room={this.state.room}
|
room={this.state.room}
|
||||||
tabComplete={this.tabComplete}
|
|
||||||
numUnreadMessages={this.state.numUnreadMessages}
|
numUnreadMessages={this.state.numUnreadMessages}
|
||||||
unsentMessageError={this.state.unsentMessageError}
|
unsentMessageError={this.state.unsentMessageError}
|
||||||
atEndOfLiveTimeline={this.state.atEndOfLiveTimeline}
|
atEndOfLiveTimeline={this.state.atEndOfLiveTimeline}
|
||||||
|
@ -1648,7 +1634,6 @@ module.exports = React.createClass({
|
||||||
onResize={this.onChildResize}
|
onResize={this.onChildResize}
|
||||||
uploadFile={this.uploadFile}
|
uploadFile={this.uploadFile}
|
||||||
callState={this.state.callState}
|
callState={this.state.callState}
|
||||||
tabComplete={this.tabComplete}
|
|
||||||
opacity={ this.props.opacity }
|
opacity={ this.props.opacity }
|
||||||
showApps={ this.state.showApps }
|
showApps={ this.state.showApps }
|
||||||
/>;
|
/>;
|
||||||
|
|
|
@ -408,8 +408,6 @@ export default class MessageComposer extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageComposer.propTypes = {
|
MessageComposer.propTypes = {
|
||||||
tabComplete: React.PropTypes.any,
|
|
||||||
|
|
||||||
// a callback which is called when the height of the composer is
|
// a callback which is called when the height of the composer is
|
||||||
// changed due to a change in content.
|
// changed due to a change in content.
|
||||||
onResize: React.PropTypes.func,
|
onResize: React.PropTypes.func,
|
||||||
|
|
|
@ -75,8 +75,6 @@ function onSendMessageFailed(err, room) {
|
||||||
*/
|
*/
|
||||||
export default class MessageComposerInput extends React.Component {
|
export default class MessageComposerInput extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
tabComplete: React.PropTypes.any,
|
|
||||||
|
|
||||||
// a callback which is called when the height of the composer is
|
// a callback which is called when the height of the composer is
|
||||||
// changed due to a change in content.
|
// changed due to a change in content.
|
||||||
onResize: React.PropTypes.func,
|
onResize: React.PropTypes.func,
|
||||||
|
@ -903,8 +901,6 @@ export default class MessageComposerInput extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageComposerInput.propTypes = {
|
MessageComposerInput.propTypes = {
|
||||||
tabComplete: React.PropTypes.any,
|
|
||||||
|
|
||||||
// a callback which is called when the height of the composer is
|
// a callback which is called when the height of the composer is
|
||||||
// changed due to a change in content.
|
// changed due to a change in content.
|
||||||
onResize: React.PropTypes.func,
|
onResize: React.PropTypes.func,
|
||||||
|
|
Loading…
Reference in a new issue