Skip to content

Commit

Permalink
proper void accounting
Browse files Browse the repository at this point in the history
  • Loading branch information
santisiri committed Apr 11, 2018
1 parent 278d3db commit 341d293
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions imports/ui/templates/widgets/feed/feed.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
{{else}}
{{> feedEmpty emptyContent}}
{{/each}}
{{#if empty}}
{{> warning label="empty-feed"}}
{{/if}}
{{#unless single}}
{{> paginator options=options count=count subfeed=subfeed}}
{{/unless}}
Expand Down
7 changes: 6 additions & 1 deletion imports/ui/templates/widgets/feed/feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,15 @@ Template.feed.onDestroyed(function () {

Template.feed.helpers({
item() {
console.log(this);
return Template.instance().feed.get();
},
empty() {
return true;
console.log(Template.instance().feed.get());
if (Template.instance().feed.get()) {
return (Template.instance().feed.get().length === 0);
}
return (!Template.instance().feed.get());
},
refresh() {
return Template.currentData().refresh;
Expand Down
3 changes: 0 additions & 3 deletions imports/ui/templates/widgets/feed/paginator.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ Template.paginator.onRendered(function () {
const loaded = Template.instance().loaded;
let isScrolling;

console.log('paginator');

$('.right').scroll(() => {
Meteor.clearTimeout(isScrolling);
isScrolling = Meteor.setTimeout(function () {
Expand All @@ -53,7 +51,6 @@ Template.paginator.helpers({
return (this.count === 0);
},
subfeed() {
console.log(this);
return this.subfeed;
},
identifier() {
Expand Down

0 comments on commit 341d293

Please sign in to comment.