hashtag in top of tag feed, scroll to comment, chat blocking, muting, filtering
This commit is contained in:
mgabdev
2020-12-21 18:30:46 -05:00
parent ee91809e8d
commit 67d94858dc
39 changed files with 576 additions and 179 deletions

View File

@@ -54,6 +54,7 @@ class ChatConversationOptionsPopover extends ImmutablePureComponent {
intl,
isXS,
isMuted,
isChatConversationRequest,
} = this.props
const items = [
@@ -62,21 +63,23 @@ class ChatConversationOptionsPopover extends ImmutablePureComponent {
title: 'Hide Conversation',
subtitle: 'Hide until next message',
onClick: () => this.handleOnHide(),
},
{
}
]
if (!isChatConversationRequest) {
items.push({
hideArrow: true,
title: isMuted ? 'Unmute Conversation' : 'Mute Conversation',
subtitle: isMuted ? null : "Don't get notified of new messages",
onClick: () => this.handleOnMute(),
},
{},
{
})
items.push({})
items.push({
hideArrow: true,
title: 'Purge messages',
subtitle: 'Remove all of your messages in this conversation',
onClick: () => this.handleOnPurge(),
},
]
})
}
return (
<PopoverLayout
@@ -125,6 +128,7 @@ ChatConversationOptionsPopover.propTypes = {
isXS: PropTypes.bool,
isPro: PropTypes.bool.isRequired,
chatConversation: ImmutablePropTypes.map,
isChatConversationRequest: PropTypes.bool,
onClosePopover: PropTypes.func.isRequired,
}

View File

@@ -16,6 +16,10 @@ import {
unbookmark,
isBookmark,
} from '../../actions/interactions';
import {
muteAccount,
unmuteAccount,
} from '../../actions/interactions';
import {
deleteStatus,
editStatus,
@@ -493,7 +497,16 @@ const mapDispatchToProps = (dispatch) => ({
accountId: account.get('id'),
}))
},
onMute(account) {
dispatch(closePopover())
if (account.getIn(['relationship', 'muting'])) {
dispatch(unmuteAccount(account.get('id')));
} else {
dispatch(openModal('MUTE', {
accountId: account.get('id'),
}))
}
},
onReport(status) {
dispatch(closePopover())
dispatch(initReport(status.get('account'), status))