1
0
mirror of https://github.com/flarum/core.git synced 2025-08-19 14:51:47 +02:00

chore: simplify checking of current composer

This commit is contained in:
Sami Mazouz
2024-10-25 14:48:16 +01:00
parent 6e5180dcfe
commit 53ac644516
5 changed files with 14 additions and 23 deletions

View File

@@ -24,11 +24,7 @@ app.initializers.add('flarum-messages', () => {
);
app.composer.composingMessageTo = function (dialog: Dialog) {
const MessageComposer = flarum.reg.checkModule('flarum-messages', 'forum/components/MessageComposer');
if (!MessageComposer) return false;
return this.isVisible() && this.bodyMatches(MessageComposer, { dialog });
return this.isVisible() && this.bodyMatches('flarum/messages/forum/components/MessageComposer', { dialog });
};
extend(IndexSidebar.prototype, 'navItems', function (items) {