More cleanup

This commit is contained in:
Essem 2023-11-05 22:29:44 -06:00
parent c774bf9204
commit 1483b2b13d
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
6 changed files with 2 additions and 21 deletions

View file

@ -212,10 +212,6 @@ RSpec/MultipleMemoizedHelpers:
RSpec/NestedGroups: RSpec/NestedGroups:
Max: 6 Max: 6
RSpec/PendingWithoutReason:
Exclude:
- 'spec/models/status_reaction_spec.rb'
# This cop supports unsafe autocorrection (--autocorrect-all). # This cop supports unsafe autocorrection (--autocorrect-all).
Rails/ApplicationController: Rails/ApplicationController:
Exclude: Exclude:

View file

@ -2,7 +2,6 @@
class Api::V1::CustomEmojisController < Api::BaseController class Api::V1::CustomEmojisController < Api::BaseController
vary_by '', unless: :disallow_unauthenticated_api_access? vary_by '', unless: :disallow_unauthenticated_api_access?
skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
def index def index
cache_even_if_authenticated! unless disallow_unauthenticated_api_access? cache_even_if_authenticated! unless disallow_unauthenticated_api_access?

View file

@ -50,7 +50,7 @@ import {
} from '../actions/statuses'; } from '../actions/statuses';
import Status from '../components/status'; import Status from '../components/status';
import { boostModal, deleteModal } from '../initial_state'; import { boostModal, deleteModal } from '../initial_state';
import { makeGetStatus, makeGetPictureInPicture, makeCustomEmojiMap } from '../selectors'; import { makeGetStatus, makeGetPictureInPicture } from '../selectors';
const messages = defineMessages({ const messages = defineMessages({
deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' }, deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
@ -72,7 +72,6 @@ const makeMapStateToProps = () => {
status: getStatus(state, props), status: getStatus(state, props),
nextInReplyToId: props.nextId ? state.getIn(['statuses', props.nextId, 'in_reply_to_id']) : null, nextInReplyToId: props.nextId ? state.getIn(['statuses', props.nextId, 'in_reply_to_id']) : null,
pictureInPicture: getPictureInPicture(state, props), pictureInPicture: getPictureInPicture(state, props),
emojiMap: makeCustomEmojiMap(state),
}); });
return mapStateToProps; return mapStateToProps;

View file

@ -67,7 +67,7 @@ import ColumnHeader from '../../components/column_header';
import { textForScreenReader, defaultMediaVisibility } from '../../components/status'; import { textForScreenReader, defaultMediaVisibility } from '../../components/status';
import StatusContainer from '../../containers/status_container'; import StatusContainer from '../../containers/status_container';
import { boostModal, deleteModal } from '../../initial_state'; import { boostModal, deleteModal } from '../../initial_state';
import { makeCustomEmojiMap, makeGetStatus, makeGetPictureInPicture } from '../../selectors'; import { makeGetStatus, makeGetPictureInPicture } from '../../selectors';
import Column from '../ui/components/column'; import Column from '../ui/components/column';
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen'; import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
@ -166,7 +166,6 @@ const makeMapStateToProps = () => {
askReplyConfirmation: state.getIn(['compose', 'text']).trim().length !== 0, askReplyConfirmation: state.getIn(['compose', 'text']).trim().length !== 0,
domain: state.getIn(['meta', 'domain']), domain: state.getIn(['meta', 'domain']),
pictureInPicture: getPictureInPicture(state, { id: props.params.statusId }), pictureInPicture: getPictureInPicture(state, { id: props.params.statusId }),
emojiMap: makeCustomEmojiMap(state),
}; };
}; };

View file

@ -128,14 +128,6 @@ export const getAccountHidden = createSelector([
return hidden && !(isSelf || followingOrRequested); return hidden && !(isSelf || followingOrRequested);
}); });
export const makeCustomEmojiMap = createSelector(
[state => state.get('custom_emojis')],
items => items.reduce(
(map, emoji) => map.set(emoji.get('shortcode'), emoji),
ImmutableMap(),
),
);
export const getStatusList = createSelector([ export const getStatusList = createSelector([
(state, type) => state.getIn(['status_lists', type, 'items']), (state, type) => state.getIn(['status_lists', type, 'items']),
], (items) => items.toList()); ], (items) => items.toList());

View file

@ -1118,10 +1118,6 @@ body > [data-popper-placement] {
} }
} }
.reactions-bar--empty {
margin-top: 0;
}
&--in-thread { &--in-thread {
$thread-margin: 46px + 10px; $thread-margin: 46px + 10px;