#679 Ask for confirmation before "Mark all as Read"

This commit is contained in:
Bogdan Teodoru 2016-01-10 17:20:01 +02:00
parent 417b7f7972
commit 1f5219f2a2

View File

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