Merge pull request #784 from sijad/no-confirm

Remove "Mark as Read" confirmation fixes #782
This commit is contained in:
Toby Zerner 2016-02-10 18:13:38 +10:30
commit e3f6092c32
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();
}
}