Merge branch 'thread-muting' into 'develop'

Permit muting a thread as an option on any post in the thread

See merge request soapbox-pub/soapbox!2247
This commit is contained in:
Alex Gleason 2023-02-02 18:23:27 +00:00
commit 6aa1d35120
4 changed files with 9 additions and 14 deletions

View file

@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Chats: improved display of media attachments. - Chats: improved display of media attachments.
- ServiceWorker: switch to a network-first strategy. The "An update is available!" prompt goes away. - ServiceWorker: switch to a network-first strategy. The "An update is available!" prompt goes away.
- Posts: increased font size of focused status in threads. - Posts: increased font size of focused status in threads.
- Posts: let "mute conversation" be clicked from any feed, not just noficiations.
### Fixed ### Fixed
- Chats: media attachments rendering at the wrong size and/or causing the chat to scroll on load. - Chats: media attachments rendering at the wrong size and/or causing the chat to scroll on load.

View file

@ -98,7 +98,6 @@ const messages = defineMessages({
interface IStatusActionBar { interface IStatusActionBar {
status: Status, status: Status,
withDismiss?: boolean,
withLabels?: boolean, withLabels?: boolean,
expandable?: boolean, expandable?: boolean,
space?: 'expand' | 'compact', space?: 'expand' | 'compact',
@ -106,7 +105,6 @@ interface IStatusActionBar {
const StatusActionBar: React.FC<IStatusActionBar> = ({ const StatusActionBar: React.FC<IStatusActionBar> = ({
status, status,
withDismiss = false,
withLabels = false, withLabels = false,
expandable = true, expandable = true,
space = 'compact', space = 'compact',
@ -387,14 +385,13 @@ const StatusActionBar: React.FC<IStatusActionBar> = ({
menu.push(null); menu.push(null);
if (ownAccount || withDismiss) {
menu.push({ menu.push({
text: intl.formatMessage(mutingConversation ? messages.unmuteConversation : messages.muteConversation), text: intl.formatMessage(mutingConversation ? messages.unmuteConversation : messages.muteConversation),
action: handleConversationMuteClick, action: handleConversationMuteClick,
icon: mutingConversation ? require('@tabler/icons/bell.svg') : require('@tabler/icons/bell-off.svg'), icon: mutingConversation ? require('@tabler/icons/bell.svg') : require('@tabler/icons/bell-off.svg'),
}); });
menu.push(null); menu.push(null);
}
if (ownAccount) { if (ownAccount) {
if (publicStatus) { if (publicStatus) {

View file

@ -53,7 +53,6 @@ export interface IStatus {
hoverable?: boolean, hoverable?: boolean,
variant?: 'default' | 'rounded', variant?: 'default' | 'rounded',
showGroup?: boolean, showGroup?: boolean,
withDismiss?: boolean,
accountAction?: React.ReactElement, accountAction?: React.ReactElement,
} }
@ -74,7 +73,6 @@ const Status: React.FC<IStatus> = (props) => {
hideActionBar, hideActionBar,
variant = 'rounded', variant = 'rounded',
showGroup = true, showGroup = true,
withDismiss,
} = props; } = props;
const intl = useIntl(); const intl = useIntl();
@ -421,7 +419,7 @@ const Status: React.FC<IStatus> = (props) => {
{(!hideActionBar && !isUnderReview) && ( {(!hideActionBar && !isUnderReview) && (
<div className='pt-4'> <div className='pt-4'>
<StatusActionBar status={actualStatus} withDismiss={withDismiss} /> <StatusActionBar status={actualStatus} />
</div> </div>
)} )}
</div> </div>

View file

@ -325,7 +325,6 @@ const Notification: React.FC<INotificaton> = (props) => {
return status && typeof status === 'object' ? ( return status && typeof status === 'object' ? (
<StatusContainer <StatusContainer
id={status.id} id={status.id}
withDismiss
hidden={hidden} hidden={hidden}
onMoveDown={handleMoveDown} onMoveDown={handleMoveDown}
onMoveUp={handleMoveUp} onMoveUp={handleMoveUp}