mirror of
https://github.com/flarum/framework.git
synced 2024-11-24 17:12:13 +08:00
#679 Ask for confirmation before "Mark all as Read"
This commit is contained in:
parent
417b7f7972
commit
1f5219f2a2
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user