mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 14:20:47 +08:00
parent
6c6975a750
commit
04ee85f266
|
@ -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';
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user