mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 14:13:37 +08:00
Merge pull request #784 from sijad/no-confirm
Remove "Mark as Read" confirmation fixes #782
This commit is contained in:
commit
e3f6092c32
8
framework/core/js/forum/dist/app.js
vendored
8
framework/core/js/forum/dist/app.js
vendored
|
@ -21671,12 +21671,8 @@ System.register('flarum/components/DiscussionListItem', ['flarum/Component', 'fl
|
||||||
var discussion = this.props.discussion;
|
var discussion = this.props.discussion;
|
||||||
|
|
||||||
if (discussion.isUnread()) {
|
if (discussion.isUnread()) {
|
||||||
var confirmation = confirm(app.translator.trans('core.forum.discussion_list.mark_all_as_read_confirmation'));
|
discussion.save({ readNumber: discussion.lastPostNumber() });
|
||||||
|
m.redraw();
|
||||||
if (confirmation) {
|
|
||||||
discussion.save({ readNumber: discussion.lastPostNumber() });
|
|
||||||
m.redraw();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,12 +174,8 @@ export default class DiscussionListItem extends Component {
|
||||||
const discussion = this.props.discussion;
|
const discussion = this.props.discussion;
|
||||||
|
|
||||||
if (discussion.isUnread()) {
|
if (discussion.isUnread()) {
|
||||||
const confirmation = confirm(app.translator.trans('core.forum.discussion_list.mark_all_as_read_confirmation'));
|
discussion.save({readNumber: discussion.lastPostNumber()});
|
||||||
|
m.redraw();
|
||||||
if (confirmation) {
|
|
||||||
discussion.save({readNumber: discussion.lastPostNumber()});
|
|
||||||
m.redraw();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user