Wire up jump-to-bottom knob
... which I embarassingly forgot
This commit is contained in:
parent
1d9c88698f
commit
81e95ca8c1
2 changed files with 11 additions and 7 deletions
|
@ -36,10 +36,6 @@ module.exports = React.createClass({
|
||||||
// true if there are messages in the room which had errors on send
|
// true if there are messages in the room which had errors on send
|
||||||
hasUnsentMessages: React.PropTypes.bool,
|
hasUnsentMessages: React.PropTypes.bool,
|
||||||
|
|
||||||
// callback for when the user clicks on the 'resend all' button in the
|
|
||||||
// 'unsent messages' bar
|
|
||||||
onResendAllClick: React.PropTypes.func,
|
|
||||||
|
|
||||||
// this is true if we are fully scrolled-down, and are looking at
|
// this is true if we are fully scrolled-down, and are looking at
|
||||||
// the end of the live timeline.
|
// the end of the live timeline.
|
||||||
atEndOfLiveTimeline: React.PropTypes.bool,
|
atEndOfLiveTimeline: React.PropTypes.bool,
|
||||||
|
@ -48,6 +44,13 @@ module.exports = React.createClass({
|
||||||
// the 'Active Call' text in the status bar if there is nothing
|
// the 'Active Call' text in the status bar if there is nothing
|
||||||
// more interesting)
|
// more interesting)
|
||||||
hasActiveCall: React.PropTypes.bool,
|
hasActiveCall: React.PropTypes.bool,
|
||||||
|
|
||||||
|
// callback for when the user clicks on the 'resend all' button in the
|
||||||
|
// 'unsent messages' bar
|
||||||
|
onResendAllClick: React.PropTypes.func,
|
||||||
|
|
||||||
|
// callback for when the user clicks on the 'scroll to bottom' button
|
||||||
|
onScrollToBottomClick: React.PropTypes.func,
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
|
@ -138,7 +141,7 @@ module.exports = React.createClass({
|
||||||
(this.props.numUnreadMessages > 1 ? "s" : "");
|
(this.props.numUnreadMessages > 1 ? "s" : "");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_RoomView_unreadMessagesBar" onClick={ this.jumpToLiveTimeline }>
|
<div className="mx_RoomView_unreadMessagesBar" onClick={ this.props.onScrollToBottomClick }>
|
||||||
<img src="img/newmessages.svg" width="24" height="24" alt=""/>
|
<img src="img/newmessages.svg" width="24" height="24" alt=""/>
|
||||||
{unreadMsgs}
|
{unreadMsgs}
|
||||||
</div>
|
</div>
|
||||||
|
@ -157,7 +160,7 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
if (!this.props.atEndOfLiveTimeline) {
|
if (!this.props.atEndOfLiveTimeline) {
|
||||||
return (
|
return (
|
||||||
<div className="mx_RoomView_scrollToBottomBar" onClick={ this.jumpToLiveTimeline }>
|
<div className="mx_RoomView_scrollToBottomBar" onClick={ this.props.onScrollToBottomClick }>
|
||||||
<img src="img/scrolldown.svg" width="24" height="24" alt="Scroll to bottom of page" title="Scroll to bottom of page"/>
|
<img src="img/scrolldown.svg" width="24" height="24" alt="Scroll to bottom of page" title="Scroll to bottom of page"/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1568,9 +1568,10 @@ module.exports = React.createClass({
|
||||||
tabCompleteEntries={tabEntries}
|
tabCompleteEntries={tabEntries}
|
||||||
numUnreadMessages={this.state.numUnreadMessages}
|
numUnreadMessages={this.state.numUnreadMessages}
|
||||||
hasUnsentMessages={this.state.hasUnsentMessages}
|
hasUnsentMessages={this.state.hasUnsentMessages}
|
||||||
onResendAllClick={this.onResendAllClick}
|
|
||||||
atEndOfLiveTimeline={this.state.atEndOfLiveTimeline}
|
atEndOfLiveTimeline={this.state.atEndOfLiveTimeline}
|
||||||
hasActiveCall={inCall}
|
hasActiveCall={inCall}
|
||||||
|
onResendAllClick={this.onResendAllClick}
|
||||||
|
onScrollToBottomClick={this.jumpToLiveTimeline}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue