Remove "Mark as Read" confirmation fixes #782

This commit is contained in:
Sajjad Hasehmian 2016-02-10 10:45:29 +03:30
parent 235c265c06
commit b3035c18b6
2 changed files with 4 additions and 12 deletions

View File

@ -21671,12 +21671,8 @@ System.register('flarum/components/DiscussionListItem', ['flarum/Component', 'fl
var discussion = this.props.discussion;
if (discussion.isUnread()) {
var confirmation = confirm(app.translator.trans('core.forum.discussion_list.mark_all_as_read_confirmation'));
if (confirmation) {
discussion.save({ readNumber: discussion.lastPostNumber() });
m.redraw();
}
discussion.save({ readNumber: discussion.lastPostNumber() });
m.redraw();
}
}

View File

@ -174,12 +174,8 @@ export default class DiscussionListItem extends Component {
const discussion = this.props.discussion;
if (discussion.isUnread()) {
const confirmation = confirm(app.translator.trans('core.forum.discussion_list.mark_all_as_read_confirmation'));
if (confirmation) {
discussion.save({readNumber: discussion.lastPostNumber()});
m.redraw();
}
discussion.save({readNumber: discussion.lastPostNumber()});
m.redraw();
}
}