Add bookmarl_category_needed setting
This commit is contained in:
parent
bd0e2bd796
commit
5a961cc368
13 changed files with 66 additions and 8 deletions
|
@ -12,7 +12,7 @@ import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/
|
|||
|
||||
import { IconButton } from '../../../components/icon_button';
|
||||
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
|
||||
import { me } from '../../../initial_state';
|
||||
import { bookmarkCategoryNeeded, me } from '../../../initial_state';
|
||||
import EmojiPickerDropdown from '../../compose/containers/emoji_picker_dropdown_container';
|
||||
|
||||
const messages = defineMessages({
|
||||
|
@ -107,7 +107,11 @@ class ActionBar extends PureComponent {
|
|||
};
|
||||
|
||||
handleBookmarkClick = (e) => {
|
||||
this.props.onBookmark(this.props.status, e);
|
||||
if (bookmarkCategoryNeeded) {
|
||||
this.props.onBookmarkCategoryAdder(this.props.status);
|
||||
} else {
|
||||
this.props.onBookmark(this.props.status, e);
|
||||
}
|
||||
};
|
||||
|
||||
handleDeleteClick = () => {
|
||||
|
|
|
@ -63,7 +63,7 @@ import {
|
|||
import ColumnHeader from '../../components/column_header';
|
||||
import { textForScreenReader, defaultMediaVisibility } from '../../components/status';
|
||||
import StatusContainer from '../../containers/status_container';
|
||||
import { boostModal, deleteModal } from '../../initial_state';
|
||||
import { bookmarkCategoryNeeded, boostModal, deleteModal } from '../../initial_state';
|
||||
import { makeGetStatus, makeGetPictureInPicture } from '../../selectors';
|
||||
import Column from '../ui/components/column';
|
||||
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
|
||||
|
@ -367,6 +367,11 @@ class Status extends ImmutablePureComponent {
|
|||
};
|
||||
|
||||
handleBookmarkClick = (status) => {
|
||||
if (bookmarkCategoryNeeded) {
|
||||
this.handleBookmarkCategoryAdderClick(status);
|
||||
return;
|
||||
}
|
||||
|
||||
if (status.get('bookmarked')) {
|
||||
this.props.dispatch(unbookmark(status));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue