Added a small margin where the PostsView will be considered to be at the bottom even if it's not exactly at the bottom
Этот коммит содержится в:
@@ -57,7 +57,10 @@ export default class PostsView extends React.Component {
|
|||||||
this.setState({displayNameType: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, 'name_format', 'false')});
|
this.setState({displayNameType: PreferenceStore.get(Preferences.CATEGORY_DISPLAY_SETTINGS, 'name_format', 'false')});
|
||||||
}
|
}
|
||||||
isAtBottom() {
|
isAtBottom() {
|
||||||
return ((this.refs.postlist.scrollHeight - this.refs.postlist.scrollTop) === this.refs.postlist.clientHeight);
|
// consider the view to be at the bottom if it's within this many pixels of the bottom
|
||||||
|
const atBottomMargin = 10;
|
||||||
|
|
||||||
|
return this.refs.postlist.clientHeight + this.refs.postlist.scrollTop >= this.refs.postlist.scrollHeight - atBottomMargin;
|
||||||
}
|
}
|
||||||
handleScroll() {
|
handleScroll() {
|
||||||
// HACK FOR RHS -- REMOVE WHEN RHS DIES
|
// HACK FOR RHS -- REMOVE WHEN RHS DIES
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user