Add glitch-soc front-end support for bookmarks

Unlike boosts and like, there is no confirmation dialog as misclicking
can be recovered without another user seeing it.
This commit is contained in:
Thibaut Girka
2018-04-11 19:42:25 +02:00
parent 09240810b4
commit acb434b0c9
14 changed files with 374 additions and 0 deletions

View File

@ -9,8 +9,10 @@ import {
import {
reblog,
favourite,
bookmark,
unreblog,
unfavourite,
unbookmark,
pin,
unpin,
} from 'flavours/glitch/actions/interactions';
@ -81,6 +83,14 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
}
},
onBookmark (status) {
if (status.get('bookmarked')) {
dispatch(unbookmark(status));
} else {
dispatch(bookmark(status));
}
},
onModalFavourite (status) {
dispatch(favourite(status));
},