Add TabCompleteBar. Hook up display to whether we are currently tab completing.

This commit is contained in:
Kegan Dougal 2015-12-21 14:11:34 +00:00
parent 26dc3cc553
commit 400b5196bb
4 changed files with 47 additions and 1 deletions

View file

@ -90,7 +90,10 @@ module.exports = React.createClass({
// completing at the start of the text
this.tabComplete = new TabComplete({
startingWordSuffix: ": ",
wordSuffix: " "
wordSuffix: " ",
onStateChange: (isCompleting) => {
this.forceUpdate();
}
});
},
@ -1284,6 +1287,12 @@ module.exports = React.createClass({
</div>
);
}
else if (this.tabComplete.isTabCompleting()) {
var TabCompleteBar = sdk.getComponent('rooms.TabCompleteBar');
statusBar = (
<TabCompleteBar />
);
}
else if (this.state.hasUnsentMessages) {
statusBar = (
<div className="mx_RoomView_connectionLostBar">