Add hotkey Q for quoting the currently focused post (#35941)
This commit is contained in:
1 parent
dccd29fe25
commit
229cbc6a24
7 files changed
+36
-1
No files matched your search
@@ -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')));
|
||||
|
||||
Reference in new issue
Block a user