0
0
Fork 0

Add user content translations with configurable backends (#19218)

This commit is contained in:
Eugen Rochko 2022-09-23 23:00:12 +02:00 committed by GitHub
parent d2f7e30a28
commit 0d6b878808
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 306 additions and 11 deletions

View file

@ -25,6 +25,8 @@ import {
revealStatus,
toggleStatusCollapse,
editStatus,
translateStatus,
undoStatusTranslation,
} from '../actions/statuses';
import {
unmuteAccount,
@ -150,6 +152,14 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({
dispatch(editStatus(status.get('id'), history));
},
onTranslate (status) {
if (status.get('translation')) {
dispatch(undoStatusTranslation(status.get('id')));
} else {
dispatch(translateStatus(status.get('id')));
}
},
onDirect (account, router) {
dispatch(directCompose(account, router));
},