about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/status_list.js
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-03-06 03:31:40 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-03-05 19:31:40 +0100
commitb0664a5e6cee9be602098fb9a2f98a9e61b2ab9b (patch)
tree7810c6b9dace8b3a6b62237f88a5e694a720f99f /app/javascript/mastodon/components/status_list.js
parenta38dbd9c8a5de4626f55d1a0dcd19ccb4a7e2c91 (diff)
Replace onScrollToBottom with onLoadMore (#6615)
onScrollToBottom was a function to run instead of onScrollToTop and
onScroll when scrolling to the bottom. The behavior to prevent
onScrollToTop was inconvenient because the viewport can be at the bottom
and at the top at the same time if the viewport is larger than the
container.

onScrollToBottom was also called when the button to load more is clicked
on contray to the name suggests, which led notifications and
status_list_container components to mark the scrolled location is not at
the top mistakenly.

onLoadMore is a replacement for onScrollToBottom. It will be called
independently from onScrollToTop and onScroll.
Diffstat (limited to 'app/javascript/mastodon/components/status_list.js')
-rw-r--r--app/javascript/mastodon/components/status_list.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/status_list.js b/app/javascript/mastodon/components/status_list.js
index eb65838ce..3bebf702c 100644
--- a/app/javascript/mastodon/components/status_list.js
+++ b/app/javascript/mastodon/components/status_list.js
@@ -12,7 +12,7 @@ export default class StatusList extends ImmutablePureComponent {
     scrollKey: PropTypes.string.isRequired,
     statusIds: ImmutablePropTypes.list.isRequired,
     featuredStatusIds: ImmutablePropTypes.list,
-    onScrollToBottom: PropTypes.func,
+    onLoadMore: PropTypes.func,
     onScrollToTop: PropTypes.func,
     onScroll: PropTypes.func,
     trackScroll: PropTypes.bool,