PERF: reduce height of the load more past message area (#20545)

On fast networks it could end up in infinite loop until all messages had been loaded.
This commit is contained in:
Joffrey JAFFEUX 2023-03-06 17:23:32 +01:00 committed by GitHub
parent 420214fc82
commit e27c045f75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -473,7 +473,7 @@ export default class ChatLivePane extends Component {
const scrollPosition = Math.abs(event.target.scrollTop);
const total = event.target.scrollHeight - event.target.clientHeight;
const ratio = (scrollPosition / total) * 100;
this.isTowardsTop = ratio < 99 && ratio >= 34;
this.isTowardsTop = ratio < 99 && ratio >= 80;
this.isTowardsBottom = ratio > 1 && ratio <= 4;
this.isAtBottom = ratio <= 1;
this.isAtTop = ratio >= 99;