Permalink
Browse files

Step 10.2: Add counter to client side

  • Loading branch information...
dotansimha authored and darkbasic committed Jan 24, 2017
1 parent 3057e70 commit 206f6af2677591e020950e7dadae9c18691284a6
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/pages/messages/messages.ts
@@ -23,6 +23,7 @@ export class MessagesPage implements OnInit, OnDestroy {
senderId: string;
loadingMessages: boolean;
messagesComputation: Subscription;
messagesBatchCounter: number = 0;
constructor(
navParams: NavParams,
@@ -65,7 +66,8 @@ export class MessagesPage implements OnInit, OnDestroy {
this.scrollOffset = this.scroller.scrollHeight;
MeteorObservable.subscribe('messages',
this.selectedChat._id
this.selectedChat._id,
++this.messagesBatchCounter
).subscribe(() => {
// Keep tracking changes in the dataset and re-render the view
if (!this.messagesComputation) {

0 comments on commit 206f6af

Please sign in to comment.