mirror of
https://github.com/flarum/framework.git
synced 2024-12-04 08:13:39 +08:00
Merge pull request #784 from sijad/no-confirm
Remove "Mark as Read" confirmation fixes #782
This commit is contained in:
commit
e3f6092c32
4
framework/core/js/forum/dist/app.js
vendored
4
framework/core/js/forum/dist/app.js
vendored
|
@ -21671,14 +21671,10 @@ 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'));
|
|
||||||
|
|
||||||
if (confirmation) {
|
|
||||||
discussion.save({ readNumber: discussion.lastPostNumber() });
|
discussion.save({ readNumber: discussion.lastPostNumber() });
|
||||||
m.redraw();
|
m.redraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build an item list of info for a discussion listing. By default this is
|
* Build an item list of info for a discussion listing. By default this is
|
||||||
|
|
|
@ -174,14 +174,10 @@ 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'));
|
|
||||||
|
|
||||||
if (confirmation) {
|
|
||||||
discussion.save({readNumber: discussion.lastPostNumber()});
|
discussion.save({readNumber: discussion.lastPostNumber()});
|
||||||
m.redraw();
|
m.redraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build an item list of info for a discussion listing. By default this is
|
* Build an item list of info for a discussion listing. By default this is
|
||||||
|
|
Loading…
Reference in New Issue
Block a user