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:
		@@ -11,6 +11,8 @@ import Column from 'flavours/glitch/features/ui/components/column';
 | 
			
		||||
import {
 | 
			
		||||
  favourite,
 | 
			
		||||
  unfavourite,
 | 
			
		||||
  bookmark,
 | 
			
		||||
  unbookmark,
 | 
			
		||||
  reblog,
 | 
			
		||||
  unreblog,
 | 
			
		||||
  pin,
 | 
			
		||||
@@ -142,6 +144,14 @@ export default class Status extends ImmutablePureComponent {
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  handleBookmarkClick = (status) => {
 | 
			
		||||
    if (status.get('bookmarked')) {
 | 
			
		||||
      this.props.dispatch(unbookmark(status));
 | 
			
		||||
    } else {
 | 
			
		||||
      this.props.dispatch(bookmark(status));
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  handleDeleteClick = (status) => {
 | 
			
		||||
    const { dispatch, intl } = this.props;
 | 
			
		||||
 | 
			
		||||
@@ -372,6 +382,7 @@ export default class Status extends ImmutablePureComponent {
 | 
			
		||||
                  onReply={this.handleReplyClick}
 | 
			
		||||
                  onFavourite={this.handleFavouriteClick}
 | 
			
		||||
                  onReblog={this.handleReblogClick}
 | 
			
		||||
                  onBookmark={this.handleBookmarkClick}
 | 
			
		||||
                  onDelete={this.handleDeleteClick}
 | 
			
		||||
                  onMention={this.handleMentionClick}
 | 
			
		||||
                  onMute={this.handleMuteClick}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user