mirror of
https://github.com/flarum/core.git
synced 2025-07-20 00:01:17 +02:00
15 lines
496 B
JavaScript
15 lines
496 B
JavaScript
import ReplyComposer from 'flarum/components/reply-composer';
|
|
import DiscussionPage from 'flarum/components/discussion-page';
|
|
|
|
export default function(app) {
|
|
app.composingReplyTo = function(discussion) {
|
|
return this.composer.component instanceof ReplyComposer &&
|
|
this.composer.component.props.discussion === discussion;
|
|
};
|
|
|
|
app.viewingDiscussion = function(discussion) {
|
|
return this.current instanceof DiscussionPage &&
|
|
this.current.discussion() === discussion;
|
|
};
|
|
};
|