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,14 +21671,10 @@ 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();
}
}
}
/**
* Build an item list of info for a discussion listing. By default this is

View File

@ -174,14 +174,10 @@ 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();
}
}
}
/**
* Build an item list of info for a discussion listing. By default this is