RN-34 tap to remove ephemeral posts (#563)
This commit is contained in:
parent
1e4e9b7962
commit
ce4f8a2600
2 changed files with 3 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ import webhookIcon from 'assets/images/icons/webhook.jpg';
|
|||
import {Posts} from 'mattermost-redux/constants';
|
||||
import DelayedAction from 'mattermost-redux/utils/delayed_action';
|
||||
import EventEmitter from 'mattermost-redux/utils/event_emitter';
|
||||
import {canDeletePost, canEditPost, isSystemMessage} from 'mattermost-redux/utils/post_utils';
|
||||
import {canDeletePost, canEditPost, isPostEphemeral, isSystemMessage} from 'mattermost-redux/utils/post_utils';
|
||||
import {isAdmin, isSystemAdmin} from 'mattermost-redux/utils/user_utils';
|
||||
|
||||
const BOT_NAME = 'BOT';
|
||||
|
|
@ -214,7 +214,7 @@ class Post extends PureComponent {
|
|||
const {post, onPress} = this.props;
|
||||
if (onPress && post.state !== Posts.POST_DELETED && !isSystemMessage(post) && !post.failed) {
|
||||
preventDoubleTap(onPress, null, post);
|
||||
} else if (post.state === Posts.POST_DELETED) {
|
||||
} else if (isPostEphemeral(post)) {
|
||||
preventDoubleTap(this.onRemovePost, this, post);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3526,7 +3526,7 @@ makeerror@1.0.x:
|
|||
|
||||
mattermost-redux@mattermost/mattermost-redux#master:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/6990daa5f010539075fe3657d379a6cd131b971a"
|
||||
resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/17b85854e5fda76d4e91b1e28d1e26b4ad57394d"
|
||||
dependencies:
|
||||
deep-equal "1.0.1"
|
||||
harmony-reflect "1.5.1"
|
||||
|
|
|
|||
Loading…
Reference in a new issue