|
|
@ -253,12 +253,13 @@ export default class AccountMenu extends Component { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setShouldShowScrollButton = () => { |
|
|
|
setShouldShowScrollButton = () => { |
|
|
|
const { scrollTop, offsetHeight, scrollHeight } = this.accountsRef; |
|
|
|
if (!this.accountsRef) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { scrollTop, offsetHeight, scrollHeight } = this.accountsRef; |
|
|
|
const canScroll = scrollHeight > offsetHeight; |
|
|
|
const canScroll = scrollHeight > offsetHeight; |
|
|
|
|
|
|
|
|
|
|
|
const atAccountListBottom = scrollTop + offsetHeight >= scrollHeight; |
|
|
|
const atAccountListBottom = scrollTop + offsetHeight >= scrollHeight; |
|
|
|
|
|
|
|
|
|
|
|
const shouldShowScrollButton = canScroll && !atAccountListBottom; |
|
|
|
const shouldShowScrollButton = canScroll && !atAccountListBottom; |
|
|
|
|
|
|
|
|
|
|
|
this.setState({ shouldShowScrollButton }); |
|
|
|
this.setState({ shouldShowScrollButton }); |
|
|
|