Do not show Top Unread Messages Bar and Jump to bottom button if searching
This commit is contained in:
parent
115e773317
commit
e9ebfa100f
1 changed files with 4 additions and 2 deletions
|
@ -1931,7 +1931,8 @@ module.exports = createReactClass({
|
||||||
/>);
|
/>);
|
||||||
|
|
||||||
let topUnreadMessagesBar = null;
|
let topUnreadMessagesBar = null;
|
||||||
if (this.state.showTopUnreadMessagesBar) {
|
// Do not show TopUnreadMessagesBar if we have search results showing, it makes no sense
|
||||||
|
if (this.state.showTopUnreadMessagesBar && !this.state.searchResults) {
|
||||||
const TopUnreadMessagesBar = sdk.getComponent('rooms.TopUnreadMessagesBar');
|
const TopUnreadMessagesBar = sdk.getComponent('rooms.TopUnreadMessagesBar');
|
||||||
topUnreadMessagesBar = (<TopUnreadMessagesBar
|
topUnreadMessagesBar = (<TopUnreadMessagesBar
|
||||||
onScrollUpClick={this.jumpToReadMarker}
|
onScrollUpClick={this.jumpToReadMarker}
|
||||||
|
@ -1939,7 +1940,8 @@ module.exports = createReactClass({
|
||||||
/>);
|
/>);
|
||||||
}
|
}
|
||||||
let jumpToBottom;
|
let jumpToBottom;
|
||||||
if (!this.state.atEndOfLiveTimeline) {
|
// Do not show JumpToBottomButton if we have search results showing, it makes no sense
|
||||||
|
if (!this.state.atEndOfLiveTimeline && !this.state.searchResults) {
|
||||||
const JumpToBottomButton = sdk.getComponent('rooms.JumpToBottomButton');
|
const JumpToBottomButton = sdk.getComponent('rooms.JumpToBottomButton');
|
||||||
jumpToBottom = (<JumpToBottomButton
|
jumpToBottom = (<JumpToBottomButton
|
||||||
numUnreadMessages={this.state.numUnreadMessages}
|
numUnreadMessages={this.state.numUnreadMessages}
|
||||||
|
|
Loading…
Reference in a new issue