mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Update Timeline component, apply block/mute filters client side for local and network timelines
This commit is contained in:
parent
5167c68d6b
commit
be194b8a3f
1 changed files with 18 additions and 2 deletions
|
@ -508,7 +508,8 @@
|
||||||
recentFeedMin: null,
|
recentFeedMin: null,
|
||||||
recentFeedMax: null,
|
recentFeedMax: null,
|
||||||
reactionBar: true,
|
reactionBar: true,
|
||||||
emptyFeed: false
|
emptyFeed: false,
|
||||||
|
filters: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -567,8 +568,17 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.scope != 'home') {
|
||||||
|
axios.get('/api/pixelfed/v2/filters')
|
||||||
|
.then(res => {
|
||||||
|
this.filters = res.data;
|
||||||
this.fetchTimelineApi();
|
this.fetchTimelineApi();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.fetchTimelineApi();
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
updated() {
|
updated() {
|
||||||
|
@ -629,6 +639,12 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.filters.length) {
|
||||||
|
data = data.filter(d => {
|
||||||
|
return this.filters.includes(d.account.id) == false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.feed.push(...data);
|
this.feed.push(...data);
|
||||||
let ids = data.map(status => status.id);
|
let ids = data.map(status => status.id);
|
||||||
this.ids = ids;
|
this.ids = ids;
|
||||||
|
|
Loading…
Reference in a new issue