]> cat aescling's git repositories - mastodon.git/commit
Replace onScrollToBottom with onLoadMore (#6615)
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Mon, 5 Mar 2018 18:31:40 +0000 (03:31 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 5 Mar 2018 18:31:40 +0000 (19:31 +0100)
commitb0664a5e6cee9be602098fb9a2f98a9e61b2ab9b
tree7810c6b9dace8b3a6b62237f88a5e694a720f99f
parenta38dbd9c8a5de4626f55d1a0dcd19ccb4a7e2c91
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.
app/javascript/mastodon/components/scrollable_list.js
app/javascript/mastodon/components/status_list.js
app/javascript/mastodon/features/account_timeline/index.js
app/javascript/mastodon/features/favourited_statuses/index.js
app/javascript/mastodon/features/notifications/index.js
app/javascript/mastodon/features/ui/containers/status_list_container.js