From 04ee85f2661d03ef1e8fe409fa973a604a6a3de8 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 26 Jun 2020 16:06:16 +0200 Subject: [PATCH] Fix extension to work with latest state changes Refs flarum/core#2150. --- .../subscriptions/js/src/forum/addSubscriptionFilter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/subscriptions/js/src/forum/addSubscriptionFilter.js b/extensions/subscriptions/js/src/forum/addSubscriptionFilter.js index 9af69ba86..0e090cea3 100644 --- a/extensions/subscriptions/js/src/forum/addSubscriptionFilter.js +++ b/extensions/subscriptions/js/src/forum/addSubscriptionFilter.js @@ -1,7 +1,7 @@ import { extend } from 'flarum/extend'; import LinkButton from 'flarum/components/LinkButton'; import IndexPage from 'flarum/components/IndexPage'; -import DiscussionList from 'flarum/components/DiscussionList'; +import DiscussionListState from 'flarum/states/DiscussionListState'; export default function addSubscriptionFilter() { extend(IndexPage.prototype, 'navItems', function(items) { @@ -24,8 +24,8 @@ export default function addSubscriptionFilter() { } }); - extend(DiscussionList.prototype, 'requestParams', function(params) { - if (this.props.params.filter === 'following') { + extend(DiscussionListState.prototype, 'requestParams', function(params) { + if (this.params.filter === 'following') { params.filter.q = (params.filter.q || '') + ' is:following'; } });