Add hotkey Q for quoting the currently focused post (#35941)
This commit is contained in:
parent
dccd29fe25
commit
229cbc6a24
7 changed files with 36 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ import {
|
|||
mentionCompose,
|
||||
directCompose,
|
||||
} from '../actions/compose';
|
||||
import { quoteComposeById } from '../actions/compose_typed';
|
||||
import {
|
||||
initDomainBlockModal,
|
||||
unblockDomain,
|
||||
|
|
@ -46,6 +47,8 @@ import Status from '../components/status';
|
|||
import { deleteModal } from '../initial_state';
|
||||
import { makeGetStatus, makeGetPictureInPicture } from '../selectors';
|
||||
|
||||
import { isFeatureEnabled } from 'mastodon/utils/environment';
|
||||
|
||||
const makeMapStateToProps = () => {
|
||||
const getStatus = makeGetStatus();
|
||||
const getPictureInPicture = makeGetPictureInPicture();
|
||||
|
|
@ -76,6 +79,12 @@ const mapDispatchToProps = (dispatch, { contextType }) => ({
|
|||
onReblog (status, e) {
|
||||
dispatch(toggleReblog(status.get('id'), e.shiftKey));
|
||||
},
|
||||
|
||||
onQuote (status) {
|
||||
if (isFeatureEnabled('outgoing_quotes')) {
|
||||
dispatch(quoteComposeById(status.get('id')));
|
||||
}
|
||||
},
|
||||
|
||||
onFavourite (status) {
|
||||
dispatch(toggleFavourite(status.get('id')));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue