mirror of
https://github.com/funamitech/mastodon
synced 2025-01-10 11:53:21 +09:00
fix build, take 4, likely caused by borked merge
This commit is contained in:
parent
68ecbcb029
commit
ecec59ea45
@ -18,8 +18,6 @@ import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router';
|
|||||||
import { IconButton } from './icon_button';
|
import { IconButton } from './icon_button';
|
||||||
import { RelativeTimestamp } from './relative_timestamp';
|
import { RelativeTimestamp } from './relative_timestamp';
|
||||||
|
|
||||||
import EmojiPickerDropdown from '../features/compose/containers/emoji_picker_dropdown_container';
|
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
delete: { id: 'status.delete', defaultMessage: 'Delete' },
|
delete: { id: 'status.delete', defaultMessage: 'Delete' },
|
||||||
redraft: { id: 'status.redraft', defaultMessage: 'Delete & re-draft' },
|
redraft: { id: 'status.redraft', defaultMessage: 'Delete & re-draft' },
|
||||||
|
@ -14,7 +14,6 @@ import EmojiPickerDropdown from 'flavours/glitch/features/compose/containers/emo
|
|||||||
import { me, maxReactions } from 'flavours/glitch/initial_state';
|
import { me, maxReactions } from 'flavours/glitch/initial_state';
|
||||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'flavours/glitch/permissions';
|
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'flavours/glitch/permissions';
|
||||||
import { accountAdminLink, statusAdminLink } from 'flavours/glitch/utils/backend_links';
|
import { accountAdminLink, statusAdminLink } from 'flavours/glitch/utils/backend_links';
|
||||||
import EmojiPickerDropdown from '../../compose/containers/emoji_picker_dropdown_container';
|
|
||||||
import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router';
|
import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
|
@ -64,7 +64,6 @@ const initialState = ImmutableMap({
|
|||||||
favourite: true,
|
favourite: true,
|
||||||
reaction: true,
|
reaction: true,
|
||||||
reblog: true,
|
reblog: true,
|
||||||
reaction: true,
|
|
||||||
mention: true,
|
mention: true,
|
||||||
poll: true,
|
poll: true,
|
||||||
status: true,
|
status: true,
|
||||||
|
@ -108,43 +108,6 @@ const statusTranslateUndo = (state, id) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateReaction = (state, id, name, updater) => state.update(
|
|
||||||
id,
|
|
||||||
status => status.update(
|
|
||||||
'reactions',
|
|
||||||
reactions => {
|
|
||||||
const index = reactions.findIndex(reaction => reaction.get('name') === name);
|
|
||||||
if (index > -1) {
|
|
||||||
return reactions.update(index, reaction => updater(reaction));
|
|
||||||
} else {
|
|
||||||
return reactions.push(updater(fromJS({ name, count: 0 })));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
const updateReactionCount = (state, reaction) => updateReaction(state, reaction.status_id, reaction.name, x => x.set('count', reaction.count));
|
|
||||||
|
|
||||||
// The url parameter is only used when adding a new custom emoji reaction
|
|
||||||
// (one that wasn't in the reactions list before) because we don't have its
|
|
||||||
// URL yet. In all other cases, it's undefined.
|
|
||||||
const addReaction = (state, id, name, url) => updateReaction(
|
|
||||||
state,
|
|
||||||
id,
|
|
||||||
name,
|
|
||||||
x => x.set('me', true)
|
|
||||||
.update('count', n => n + 1)
|
|
||||||
.update('url', old => old ? old : url)
|
|
||||||
.update('static_url', old => old ? old : url),
|
|
||||||
);
|
|
||||||
|
|
||||||
const removeReaction = (state, id, name) => updateReaction(
|
|
||||||
state,
|
|
||||||
id,
|
|
||||||
name,
|
|
||||||
x => x.set('me', false).update('count', n => n - 1),
|
|
||||||
);
|
|
||||||
|
|
||||||
const initialState = ImmutableMap();
|
const initialState = ImmutableMap();
|
||||||
|
|
||||||
export default function statuses(state = initialState, action) {
|
export default function statuses(state = initialState, action) {
|
||||||
|
@ -30,7 +30,6 @@ import { DisplayName } from './display_name';
|
|||||||
import { getHashtagBarForStatus } from './hashtag_bar';
|
import { getHashtagBarForStatus } from './hashtag_bar';
|
||||||
import { RelativeTimestamp } from './relative_timestamp';
|
import { RelativeTimestamp } from './relative_timestamp';
|
||||||
import StatusActionBar from './status_action_bar';
|
import StatusActionBar from './status_action_bar';
|
||||||
import StatusReactions from './status_reactions';
|
|
||||||
import StatusContent from './status_content';
|
import StatusContent from './status_content';
|
||||||
import StatusReactions from './status_reactions';
|
import StatusReactions from './status_reactions';
|
||||||
import { VisibilityIcon } from './visibility_icon';
|
import { VisibilityIcon } from './visibility_icon';
|
||||||
|
@ -21,7 +21,6 @@ import { ReactComponent as StarBorderIcon } from '@material-symbols/svg-600/outl
|
|||||||
import { ReactComponent as VisibilityIcon } from '@material-symbols/svg-600/outlined/visibility.svg';
|
import { ReactComponent as VisibilityIcon } from '@material-symbols/svg-600/outlined/visibility.svg';
|
||||||
|
|
||||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions';
|
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions';
|
||||||
import EmojiPickerDropdown from '../features/compose/containers/emoji_picker_dropdown_container';
|
|
||||||
import { WithRouterPropTypes } from 'mastodon/utils/react_router';
|
import { WithRouterPropTypes } from 'mastodon/utils/react_router';
|
||||||
|
|
||||||
import DropdownMenuContainer from '../containers/dropdown_menu_container';
|
import DropdownMenuContainer from '../containers/dropdown_menu_container';
|
||||||
|
@ -112,11 +112,7 @@ class ActionBar extends PureComponent {
|
|||||||
|
|
||||||
handleEmojiPick = data => {
|
handleEmojiPick = data => {
|
||||||
this.props.onReactionAdd(this.props.status.get('id'), data.native.replace(/:/g, ''));
|
this.props.onReactionAdd(this.props.status.get('id'), data.native.replace(/:/g, ''));
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
};
|
};
|
||||||
>>>>>>> pr2462
|
|
||||||
|
|
||||||
handleBookmarkClick = (e) => {
|
handleBookmarkClick = (e) => {
|
||||||
this.props.onBookmark(this.props.status, e);
|
this.props.onBookmark(this.props.status, e);
|
||||||
|
@ -59,7 +59,6 @@ const initialState = ImmutableMap({
|
|||||||
favourite: true,
|
favourite: true,
|
||||||
reaction: true,
|
reaction: true,
|
||||||
reblog: true,
|
reblog: true,
|
||||||
reaction: true,
|
|
||||||
mention: true,
|
mention: true,
|
||||||
poll: true,
|
poll: true,
|
||||||
status: true,
|
status: true,
|
||||||
|
@ -13,11 +13,6 @@ import {
|
|||||||
UNFAVOURITE_FAIL,
|
UNFAVOURITE_FAIL,
|
||||||
BOOKMARK_REQUEST,
|
BOOKMARK_REQUEST,
|
||||||
BOOKMARK_FAIL,
|
BOOKMARK_FAIL,
|
||||||
REACTION_UPDATE,
|
|
||||||
REACTION_ADD_FAIL,
|
|
||||||
REACTION_REMOVE_FAIL,
|
|
||||||
REACTION_ADD_REQUEST,
|
|
||||||
REACTION_REMOVE_REQUEST,
|
|
||||||
UNBOOKMARK_REQUEST,
|
UNBOOKMARK_REQUEST,
|
||||||
UNBOOKMARK_FAIL,
|
UNBOOKMARK_FAIL,
|
||||||
REACTION_UPDATE,
|
REACTION_UPDATE,
|
||||||
|
Loading…
Reference in New Issue
Block a user