0
0
Fork 0

Use local instead of global loading indicator for timelines, account timelines (#9224)

So that opening a profile feels faster. Also, pinned toots are not
shown before other toots have loaded. Also, if no toots are loaded,
added empty message
This commit is contained in:
Eugen Rochko 2018-11-08 21:35:06 +01:00 committed by GitHub
parent f055907857
commit dd00cd19d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 12 deletions

View file

@ -25,7 +25,7 @@ export default class StatusList extends ImmutablePureComponent {
prepend: PropTypes.node,
emptyMessage: PropTypes.node,
alwaysPrepend: PropTypes.bool,
timelineId: PropTypes.string.isRequired,
timelineId: PropTypes.string,
};
static defaultProps = {
@ -124,7 +124,7 @@ export default class StatusList extends ImmutablePureComponent {
}
return (
<ScrollableList {...other} onLoadMore={onLoadMore && this.handleLoadOlder} shouldUpdateScroll={shouldUpdateScroll} ref={this.setRef}>
<ScrollableList {...other} showLoading={isLoading && statusIds.size === 0} onLoadMore={onLoadMore && this.handleLoadOlder} shouldUpdateScroll={shouldUpdateScroll} ref={this.setRef}>
{scrollableContent}
</ScrollableList>
);