mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 06:28:03 +08:00
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:
parent
420214fc82
commit
e27c045f75
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user