Composer quote improvements (#35835)
Co-authored-by: Claire <claire.github-309c@sitedethib.com> Co-authored-by: diondiondion <mail@diondiondion.com>
This commit is contained in:
parent
e770303968
commit
f85f0eee1b
15 changed files with 371 additions and 96 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import PropTypes from 'prop-types';
|
||||
|
||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
|
||||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
|
||||
import classNames from 'classnames';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
|
@ -15,7 +15,6 @@ import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?reac
|
|||
import { Hotkeys } from 'mastodon/components/hotkeys';
|
||||
import { Icon } from 'mastodon/components/icon';
|
||||
import { LoadingIndicator } from 'mastodon/components/loading_indicator';
|
||||
import { TimelineHint } from 'mastodon/components/timeline_hint';
|
||||
import ScrollContainer from 'mastodon/containers/scroll_container';
|
||||
import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
|
||||
import { identityContextPropShape, withIdentity } from 'mastodon/identity_context';
|
||||
|
|
@ -57,6 +56,7 @@ import {
|
|||
translateStatus,
|
||||
undoStatusTranslation,
|
||||
} from '../../actions/statuses';
|
||||
import { setStatusQuotePolicy } from '../../actions/statuses_typed';
|
||||
import ColumnHeader from '../../components/column_header';
|
||||
import { textForScreenReader, defaultMediaVisibility } from '../../components/status';
|
||||
import { StatusQuoteManager } from '../../components/status_quoted';
|
||||
|
|
@ -266,8 +266,14 @@ class Status extends ImmutablePureComponent {
|
|||
};
|
||||
|
||||
handleQuotePolicyChange = (status) => {
|
||||
const statusId = status.get('id');
|
||||
const { dispatch } = this.props;
|
||||
dispatch(openModal({ modalType: 'COMPOSE_PRIVACY', modalProps: { statusId: status.get('id') } }));
|
||||
const handleChange = (_, quotePolicy) => {
|
||||
dispatch(
|
||||
setStatusQuotePolicy({ policy: quotePolicy, statusId }),
|
||||
);
|
||||
}
|
||||
dispatch(openModal({ modalType: 'COMPOSE_PRIVACY', modalProps: { statusId, onChange: handleChange } }));
|
||||
};
|
||||
|
||||
handleEditClick = (status) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue