logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: add3358722795a0574370ca384c7b3e95da80447
parent: ea18f5de210add3aae7d61c2f037d57c2df50a59
Author: Morgan Bazalgette <the@howl.moe>
Date:   Sat, 31 Mar 2018 14:08:04 +0200

remove mutes

Diffstat:

Mapp/javascript/mastodon/components/status_action_bar.js7-------
Mapp/javascript/mastodon/features/account/components/action_bar.js9---------
Mapp/javascript/mastodon/features/getting_started/index.js2--
Mapp/javascript/mastodon/features/status/components/action_bar.js7-------
Mapp/javascript/mastodon/features/ui/components/modal_root.js2--
Mapp/javascript/mastodon/features/ui/index.js8--------
Mapp/javascript/mastodon/features/ui/util/async-components.js8--------
Mapp/javascript/mastodon/reducers/index.js2--
Mapp/javascript/mastodon/reducers/user_lists.js9---------
9 files changed, 0 insertions(+), 54 deletions(-)

diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js @@ -10,7 +10,6 @@ import { me } from '../initial_state'; const messages = defineMessages({ delete: { id: 'status.delete', defaultMessage: 'Delete' }, mention: { id: 'status.mention', defaultMessage: 'Mention @{name}' }, - mute: { id: 'account.mute', defaultMessage: 'Mute @{name}' }, block: { id: 'account.block', defaultMessage: 'Block @{name}' }, reply: { id: 'status.reply', defaultMessage: 'Reply' }, share: { id: 'status.share', defaultMessage: 'Share' }, @@ -39,7 +38,6 @@ export default class StatusActionBar extends ImmutablePureComponent { onReblog: PropTypes.func, onDelete: PropTypes.func, onMention: PropTypes.func, - onMute: PropTypes.func, onBlock: PropTypes.func, onReport: PropTypes.func, onMuteConversation: PropTypes.func, @@ -86,10 +84,6 @@ export default class StatusActionBar extends ImmutablePureComponent { this.props.onMention(this.props.status.get('account'), this.context.router.history); } - handleMuteClick = () => { - this.props.onMute(this.props.status.get('account')); - } - handleBlockClick = () => { this.props.onBlock(this.props.status.get('account')); } @@ -132,7 +126,6 @@ export default class StatusActionBar extends ImmutablePureComponent { } else { menu.push({ text: intl.formatMessage(messages.mention, { name: status.getIn(['account', 'username']) }), action: this.handleMentionClick }); menu.push(null); - menu.push({ text: intl.formatMessage(messages.mute, { name: status.getIn(['account', 'username']) }), action: this.handleMuteClick }); menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick }); menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport }); } diff --git a/app/javascript/mastodon/features/account/components/action_bar.js b/app/javascript/mastodon/features/account/components/action_bar.js @@ -12,9 +12,7 @@ const messages = defineMessages({ edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' }, unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' }, unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' }, - unmute: { id: 'account.unmute', defaultMessage: 'Unmute @{name}' }, block: { id: 'account.block', defaultMessage: 'Block @{name}' }, - mute: { id: 'account.mute', defaultMessage: 'Mute @{name}' }, follow: { id: 'account.follow', defaultMessage: 'Follow' }, report: { id: 'account.report', defaultMessage: 'Report @{name}' }, share: { id: 'account.share', defaultMessage: 'Share @{name}\'s profile' }, @@ -34,7 +32,6 @@ export default class ActionBar extends React.PureComponent { onDirect: PropTypes.func.isRequired, onReblogToggle: PropTypes.func.isRequired, onReport: PropTypes.func.isRequired, - onMute: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, }; @@ -70,12 +67,6 @@ export default class ActionBar extends React.PureComponent { } } - if (account.getIn(['relationship', 'muting'])) { - menu.push({ text: intl.formatMessage(messages.unmute, { name: account.get('username') }), action: this.props.onMute }); - } else { - menu.push({ text: intl.formatMessage(messages.mute, { name: account.get('username') }), action: this.props.onMute }); - } - if (account.getIn(['relationship', 'blocking'])) { menu.push({ text: intl.formatMessage(messages.unblock, { name: account.get('username') }), action: this.props.onBlock }); } else { diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js @@ -24,7 +24,6 @@ const messages = defineMessages({ sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Logout' }, favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' }, blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' }, - mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' }, info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' }, lists: { id: 'navigation_bar.lists', defaultMessage: 'Lists' }, keyboard_shortcuts: { id: 'navigation_bar.keyboard_shortcuts', defaultMessage: 'Keyboard shortcuts' }, @@ -117,7 +116,6 @@ export default class GettingStarted extends ImmutablePureComponent { <ColumnSubheading text={intl.formatMessage(messages.navigation_subheading)} /> {navItems} <ColumnSubheading text={intl.formatMessage(messages.settings_subheading)} /> - <ColumnLink icon='volume-off' text={intl.formatMessage(messages.mutes)} to='/mutes' /> <ColumnLink icon='ban' text={intl.formatMessage(messages.blocks)} to='/blocks' /> <ColumnLink icon='cog' text={intl.formatMessage(messages.preferences)} href='/user-settings' /> <ColumnLink icon='sign-out' text={intl.formatMessage(messages.sign_out)} href='/auth/sign_out' method='delete' /> diff --git a/app/javascript/mastodon/features/status/components/action_bar.js b/app/javascript/mastodon/features/status/components/action_bar.js @@ -13,7 +13,6 @@ const messages = defineMessages({ reblog: { id: 'status.reblog', defaultMessage: 'Boost' }, cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' }, favourite: { id: 'status.favourite', defaultMessage: 'Favourite' }, - mute: { id: 'status.mute', defaultMessage: 'Mute @{name}' }, muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' }, unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' }, block: { id: 'status.block', defaultMessage: 'Block @{name}' }, @@ -35,7 +34,6 @@ export default class ActionBar extends React.PureComponent { onFavourite: PropTypes.func.isRequired, onDelete: PropTypes.func.isRequired, onMention: PropTypes.func.isRequired, - onMute: PropTypes.func, onMuteConversation: PropTypes.func, onBlock: PropTypes.func, onReport: PropTypes.func, @@ -63,10 +61,6 @@ export default class ActionBar extends React.PureComponent { this.props.onMention(this.props.status.get('account'), this.context.router.history); } - handleMuteClick = () => { - this.props.onMute(this.props.status.get('account')); - } - handleConversationMuteClick = () => { this.props.onMuteConversation(this.props.status); } @@ -105,7 +99,6 @@ export default class ActionBar extends React.PureComponent { } else { menu.push({ text: intl.formatMessage(messages.mention, { name: status.getIn(['account', 'username']) }), action: this.handleMentionClick }); menu.push(null); - menu.push({ text: intl.formatMessage(messages.mute, { name: status.getIn(['account', 'username']) }), action: this.handleMuteClick }); menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick }); menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport }); } diff --git a/app/javascript/mastodon/features/ui/components/modal_root.js b/app/javascript/mastodon/features/ui/components/modal_root.js @@ -12,7 +12,6 @@ import ConfirmationModal from './confirmation_modal'; import FocalPointModal from './focal_point_modal'; import { OnboardingModal, - MuteModal, ReportModal, ListEditor, } from '../../../features/ui/util/async-components'; @@ -23,7 +22,6 @@ const MODAL_COMPONENTS = { 'VIDEO': () => Promise.resolve({ default: VideoModal }), 'BOOST': () => Promise.resolve({ default: BoostModal }), 'CONFIRM': () => Promise.resolve({ default: ConfirmationModal }), - 'MUTE': MuteModal, 'REPORT': ReportModal, 'ACTIONS': () => Promise.resolve({ default: ActionsModal }), 'LIST_EDITOR': ListEditor, diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js @@ -37,7 +37,6 @@ import { FavouritedStatuses, ListTimeline, Blocks, - Mutes, Lists, } from './util/async-components'; import { HotKeys } from 'react-hotkeys'; @@ -81,7 +80,6 @@ const keyMap = { goToFavourites: 'g f', goToProfile: 'g u', goToBlocked: 'g b', - goToMuted: 'g m', }; class SwitchingColumnsArea extends React.PureComponent { @@ -155,7 +153,6 @@ class SwitchingColumnsArea extends React.PureComponent { <WrappedRoute path='/follow_requests' component={FollowRequests} content={children} /> <WrappedRoute path='/blocks' component={Blocks} content={children} /> - <WrappedRoute path='/mutes' component={Mutes} content={children} /> <WrappedRoute path='/lists' component={Lists} content={children} /> <WrappedRoute component={GenericNotFound} content={children} /> @@ -394,10 +391,6 @@ export default class UI extends React.PureComponent { this.context.router.history.push('/blocks'); } - handleHotkeyGoToMuted = () => { - this.context.router.history.push('/mutes'); - } - render () { const { draggingOver } = this.state; const { children, isComposing, location, dropdownMenuIsOpen } = this.props; @@ -417,7 +410,6 @@ export default class UI extends React.PureComponent { goToFavourites: this.handleHotkeyGoToFavourites, goToProfile: this.handleHotkeyGoToProfile, goToBlocked: this.handleHotkeyGoToBlocked, - goToMuted: this.handleHotkeyGoToMuted, }; return ( diff --git a/app/javascript/mastodon/features/ui/util/async-components.js b/app/javascript/mastodon/features/ui/util/async-components.js @@ -86,18 +86,10 @@ export function Blocks () { return import(/* webpackChunkName: "features/blocks" */'../../blocks'); } -export function Mutes () { - return import(/* webpackChunkName: "features/mutes" */'../../mutes'); -} - export function OnboardingModal () { return import(/* webpackChunkName: "modals/onboarding_modal" */'../components/onboarding_modal'); } -export function MuteModal () { - return import(/* webpackChunkName: "modals/mute_modal" */'../components/mute_modal'); -} - export function ReportModal () { return import(/* webpackChunkName: "modals/report_modal" */'../components/report_modal'); } diff --git a/app/javascript/mastodon/reducers/index.js b/app/javascript/mastodon/reducers/index.js @@ -15,7 +15,6 @@ import settings from './settings'; import push_notifications from './push_notifications'; import status_lists from './status_lists'; import cards from './cards'; -import mutes from './mutes'; import reports from './reports'; import contexts from './contexts'; import compose from './compose'; @@ -44,7 +43,6 @@ const reducers = { settings, push_notifications, cards, - mutes, reports, contexts, compose, diff --git a/app/javascript/mastodon/reducers/user_lists.js b/app/javascript/mastodon/reducers/user_lists.js @@ -16,10 +16,6 @@ import { BLOCKS_FETCH_SUCCESS, BLOCKS_EXPAND_SUCCESS, } from '../actions/blocks'; -import { - MUTES_FETCH_SUCCESS, - MUTES_EXPAND_SUCCESS, -} from '../actions/mutes'; import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; const initialState = ImmutableMap({ @@ -29,7 +25,6 @@ const initialState = ImmutableMap({ favourited_by: ImmutableMap(), follow_requests: ImmutableMap(), blocks: ImmutableMap(), - mutes: ImmutableMap(), }); const normalizeList = (state, type, id, accounts, next) => { @@ -70,10 +65,6 @@ export default function userLists(state = initialState, action) { return state.setIn(['blocks', 'items'], ImmutableList(action.accounts.map(item => item.id))).setIn(['blocks', 'next'], action.next); case BLOCKS_EXPAND_SUCCESS: return state.updateIn(['blocks', 'items'], list => list.concat(action.accounts.map(item => item.id))).setIn(['blocks', 'next'], action.next); - case MUTES_FETCH_SUCCESS: - return state.setIn(['mutes', 'items'], ImmutableList(action.accounts.map(item => item.id))).setIn(['mutes', 'next'], action.next); - case MUTES_EXPAND_SUCCESS: - return state.updateIn(['mutes', 'items'], list => list.concat(action.accounts.map(item => item.id))).setIn(['mutes', 'next'], action.next); default: return state; }