From 2347ea813e5be2ecf762c8a275373a3e2bea56e8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 11 Mar 2024 09:57:23 +0100 Subject: [PATCH] Change dropdown menu icon to not be replaced by close icon when open in web UI (#29532) --- app/javascript/mastodon/components/dropdown_menu.jsx | 3 +-- app/javascript/mastodon/features/ui/index.jsx | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/javascript/mastodon/components/dropdown_menu.jsx b/app/javascript/mastodon/components/dropdown_menu.jsx index f6c08dd43b..524dbb927b 100644 --- a/app/javascript/mastodon/components/dropdown_menu.jsx +++ b/app/javascript/mastodon/components/dropdown_menu.jsx @@ -9,7 +9,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { supportsPassiveEvents } from 'detect-passive-events'; import Overlay from 'react-overlays/Overlay'; -import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import { CircularProgress } from 'mastodon/components/circular_progress'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; @@ -298,7 +297,7 @@ class Dropdown extends PureComponent { }) : ( ({ hasComposingText: state.getIn(['compose', 'text']).trim().length !== 0, hasMediaAttachments: state.getIn(['compose', 'media_attachments']).size > 0, canUploadMore: !state.getIn(['compose', 'media_attachments']).some(x => ['audio', 'video'].includes(x.get('type'))) && state.getIn(['compose', 'media_attachments']).size < 4, - dropdownMenuIsOpen: state.dropdownMenu.openId !== null, firstLaunch: state.getIn(['settings', 'introductionVersion'], 0) < INTRODUCTION_VERSION, username: state.getIn(['accounts', me, 'username']), }); @@ -262,7 +261,6 @@ class UI extends PureComponent { hasMediaAttachments: PropTypes.bool, canUploadMore: PropTypes.bool, intl: PropTypes.object.isRequired, - dropdownMenuIsOpen: PropTypes.bool, layout: PropTypes.string.isRequired, firstLaunch: PropTypes.bool, username: PropTypes.string, @@ -555,7 +553,7 @@ class UI extends PureComponent { render () { const { draggingOver } = this.state; - const { children, isComposing, location, dropdownMenuIsOpen, layout } = this.props; + const { children, isComposing, location, layout } = this.props; const handlers = { help: this.handleHotkeyToggleHelp, @@ -581,7 +579,7 @@ class UI extends PureComponent { return ( -
+