This commit is contained in:
2019-06-05 16:07:30 +10:00
parent 436a5e3cbe
commit a3e2088707
+3 -3
View File
@@ -84,10 +84,10 @@ class SpyingLog extends React.Component {
} }
buttonHeader() { buttonHeader() {
if (!this.buttonsVisible) { if (!this.buttonsVisible && this.props.spies <= 0) {
return null; return null;
} }
//TODO: prettier messages
return ( return (
<div className='table noCollapse'> <div className='table noCollapse'>
<div className='row'> <div className='row'>
@@ -151,7 +151,7 @@ class SpyingLog extends React.Component {
} }
onReceived(data) { onReceived(data) {
this.setState({ buttonsVisible: data.length > 0 || this.props.spies > 0 }); this.setState({ buttonsVisible: data.length > 0 });
if (data.length === 0) { if (data.length === 0) {
let start = Math.max(0, this.state.start - this.state.length); let start = Math.max(0, this.state.start - this.state.length);