New change settings option and possibility to hide system messagaes

This commit is contained in:
Mario Orlicky 2016-11-19 19:02:33 +01:00
parent 94cdcff79f
commit 8290dcb249
6 changed files with 61 additions and 13 deletions

View file

@ -12,10 +12,12 @@ BlazeComponent.extendComponent({
const capitalizedMode = Utils.capitalize(mode);
const id = Session.get(`current${capitalizedMode}`);
const limit = this.page.get() * activitiesPerPage;
const user = Meteor.user();
const hideSystem = user ? user.hasHiddenSystemMessages() : false;
if (id === null)
return;
this.subscribe('activities', mode, id, limit, () => {
this.subscribe('activities', mode, id, limit, hideSystem, () => {
this.loadNextPageLocked = false;
// If the sibear peak hasn't increased, that mean that there are no more