mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 17:31:12 +00:00
Change "new replies available" notice to be above replies in web UI (#35575)
This commit is contained in:
parent
3eca8cce1c
commit
d121007927
|
@ -2,8 +2,6 @@ import { useEffect, useState, useCallback } from 'react';
|
||||||
|
|
||||||
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
import classNames from 'classnames';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
fetchContext,
|
fetchContext,
|
||||||
completeContextRefresh,
|
completeContextRefresh,
|
||||||
|
@ -22,8 +20,7 @@ const messages = defineMessages({
|
||||||
|
|
||||||
export const RefreshController: React.FC<{
|
export const RefreshController: React.FC<{
|
||||||
statusId: string;
|
statusId: string;
|
||||||
withBorder?: boolean;
|
}> = ({ statusId }) => {
|
||||||
}> = ({ statusId, withBorder }) => {
|
|
||||||
const refresh = useAppSelector(
|
const refresh = useAppSelector(
|
||||||
(state) => state.contexts.refreshing[statusId],
|
(state) => state.contexts.refreshing[statusId],
|
||||||
);
|
);
|
||||||
|
@ -78,12 +75,7 @@ export const RefreshController: React.FC<{
|
||||||
|
|
||||||
if (ready && !loading) {
|
if (ready && !loading) {
|
||||||
return (
|
return (
|
||||||
<button
|
<button className='load-more load-gap' onClick={handleClick}>
|
||||||
className={classNames('load-more load-gap', {
|
|
||||||
'timeline-hint--with-descendants': withBorder,
|
|
||||||
})}
|
|
||||||
onClick={handleClick}
|
|
||||||
>
|
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='status.context.load_new_replies'
|
id='status.context.load_new_replies'
|
||||||
defaultMessage='New replies available'
|
defaultMessage='New replies available'
|
||||||
|
@ -98,9 +90,7 @@ export const RefreshController: React.FC<{
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classNames('load-more load-gap', {
|
className='load-more load-gap'
|
||||||
'timeline-hint--with-descendants': withBorder,
|
|
||||||
})}
|
|
||||||
aria-busy
|
aria-busy
|
||||||
aria-live='polite'
|
aria-live='polite'
|
||||||
aria-label={intl.formatMessage(messages.loading)}
|
aria-label={intl.formatMessage(messages.loading)}
|
||||||
|
|
|
@ -580,7 +580,6 @@ class Status extends ImmutablePureComponent {
|
||||||
remoteHint = (
|
remoteHint = (
|
||||||
<RefreshController
|
<RefreshController
|
||||||
statusId={status.get('id')}
|
statusId={status.get('id')}
|
||||||
withBorder={!!descendants}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -653,8 +652,8 @@ class Status extends ImmutablePureComponent {
|
||||||
</div>
|
</div>
|
||||||
</Hotkeys>
|
</Hotkeys>
|
||||||
|
|
||||||
{descendants}
|
|
||||||
{remoteHint}
|
{remoteHint}
|
||||||
|
{descendants}
|
||||||
</div>
|
</div>
|
||||||
</ScrollContainer>
|
</ScrollContainer>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user