From c53ff0feccf167a939d7e16e49adf45c2acc3630 Mon Sep 17 00:00:00 2001 From: fef Date: Thu, 1 Dec 2022 23:30:39 +0100 Subject: [PATCH] cleanup JS imports and other minor stuff --- .../flavours/glitch/actions/interactions.js | 6 ------ .../flavours/glitch/components/status_reactions.js | 10 +--------- .../glitch/features/local_settings/page/index.jsx | 1 - .../features/local_settings/page/item/index.jsx | 11 +++++------ .../features/status/components/detailed_status.jsx | 2 +- .../flavours/glitch/features/status/index.jsx | 2 +- app/javascript/flavours/glitch/initial_state.js | 3 ++- app/javascript/mastodon/actions/interactions.js | 6 ------ app/javascript/mastodon/components/status.jsx | 3 +-- .../mastodon/components/status_reactions.js | 10 +--------- .../features/status/components/detailed_status.jsx | 2 +- app/javascript/mastodon/features/status/index.jsx | 2 +- app/javascript/mastodon/initial_state.js | 2 +- 13 files changed, 15 insertions(+), 45 deletions(-) diff --git a/app/javascript/flavours/glitch/actions/interactions.js b/app/javascript/flavours/glitch/actions/interactions.js index dbcf13ec41..061e0c252c 100644 --- a/app/javascript/flavours/glitch/actions/interactions.js +++ b/app/javascript/flavours/glitch/actions/interactions.js @@ -429,14 +429,12 @@ export const addReactionRequest = (statusId, name) => ({ type: REACTION_ADD_REQUEST, id: statusId, name, - skipLoading: true, }); export const addReactionSuccess = (statusId, name) => ({ type: REACTION_ADD_SUCCESS, id: statusId, name, - skipLoading: true, }); export const addReactionFail = (statusId, name, error) => ({ @@ -444,7 +442,6 @@ export const addReactionFail = (statusId, name, error) => ({ id: statusId, name, error, - skipLoading: true, }); export const removeReaction = (statusId, name) => (dispatch, getState) => { @@ -461,19 +458,16 @@ export const removeReactionRequest = (statusId, name) => ({ type: REACTION_REMOVE_REQUEST, id: statusId, name, - skipLoading: true, }); export const removeReactionSuccess = (statusId, name) => ({ type: REACTION_REMOVE_SUCCESS, id: statusId, name, - skipLoading: true, }); export const removeReactionFail = (statusId, name) => ({ type: REACTION_REMOVE_FAIL, id: statusId, name, - skipLoading: true, }); diff --git a/app/javascript/flavours/glitch/components/status_reactions.js b/app/javascript/flavours/glitch/components/status_reactions.js index df2a686abd..63ec7941cb 100644 --- a/app/javascript/flavours/glitch/components/status_reactions.js +++ b/app/javascript/flavours/glitch/components/status_reactions.js @@ -1,7 +1,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; -import { reduceMotion } from '../initial_state'; +import { autoPlayGif, reduceMotion } from '../initial_state'; import spring from 'react-motion/lib/spring'; import TransitionMotion from 'react-motion/lib/TransitionMotion'; import classNames from 'classnames'; @@ -9,7 +9,6 @@ import React from 'react'; import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light'; import AnimatedNumber from './animated_number'; import { assetHost } from '../utils/config'; -import { autoPlayGif } from '../initial_state'; export default class StatusReactions extends ImmutablePureComponent { @@ -101,19 +100,12 @@ class Reaction extends ImmutablePureComponent { render() { const { reaction } = this.props; - let shortCode = reaction.get('name'); - - if (unicodeMapping[shortCode]) { - shortCode = unicodeMapping[shortCode].shortCode; - } - return (