[Glitch] Fix loading spinner + infinite scroll for private mentions

Port c9fed25d56 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Christian Schmidt 2023-04-07 15:44:31 +02:00 committed by Claire
parent 61e2fa8b76
commit 3e1e35b8ec
3 changed files with 7 additions and 2 deletions

View file

@ -55,10 +55,10 @@ export default class ConversationsList extends ImmutablePureComponent {
}, 300, { leading: true });
render () {
const { conversations, onLoadMore, ...other } = this.props;
const { conversations, isLoading, onLoadMore, ...other } = this.props;
return (
<ScrollableList {...other} onLoadMore={onLoadMore && this.handleLoadOlder} ref={this.setRef}>
<ScrollableList {...other} isLoading={isLoading} showLoading={isLoading && conversations.isEmpty()} onLoadMore={onLoadMore && this.handleLoadOlder} ref={this.setRef}>
{conversations.map(item => (
<ConversationContainer
key={item.get('id')}

View file

@ -108,8 +108,10 @@ class DirectTimeline extends React.PureComponent {
trackScroll={!pinned}
scrollKey={`direct_timeline-${columnId}`}
timelineId='direct'
bindToDocument={!multiColumn}
onLoadMore={this.handleLoadMore}
prepend={<div className='follow_requests-unlocked_explanation'><span><FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a></span></div>}
alwaysPrepend
emptyMessage={<FormattedMessage id='empty_column.direct' defaultMessage="You don't have any direct messages yet. When you send or receive one, it will show up here." />}
/>
);
@ -119,8 +121,10 @@ class DirectTimeline extends React.PureComponent {
trackScroll={!pinned}
scrollKey={`direct_timeline-${columnId}`}
timelineId='direct'
bindToDocument={!multiColumn}
onLoadMore={this.handleLoadMoreTimeline}
prepend={<div className='follow_requests-unlocked_explanation'><span><FormattedMessage id='compose_form.encryption_warning' defaultMessage='Posts on Mastodon are not end-to-end encrypted. Do not share any dangerous information over Mastodon.' /> <a href='/terms' target='_blank'><FormattedMessage id='compose_form.direct_message_warning_learn_more' defaultMessage='Learn more' /></a></span></div>}
alwaysPrepend
emptyMessage={<FormattedMessage id='empty_column.direct' defaultMessage="You don't have any direct messages yet. When you send or receive one, it will show up here." />}
/>
);

View file

@ -650,6 +650,7 @@ $ui-header-height: 55px;
.follow_requests-unlocked_explanation {
background: darken($ui-base-color, 4%);
contain: initial;
flex-grow: 0;
}
.error-column {