From 204b8e490de4db532edb884eaec33c66ae2f4185 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Sat, 10 Jun 2017 22:43:38 -0700 Subject: [PATCH] fetching newer and older posts --- src/pages/login/login.ts | 6 +-- src/pages/post-details/post-details.ts | 2 +- src/pages/stream/stream.html | 14 ++++-- src/pages/stream/stream.ts | 69 ++++++++++++++++++++------ 4 files changed, 68 insertions(+), 23 deletions(-) diff --git a/src/pages/login/login.ts b/src/pages/login/login.ts index 8435f8f..253b15d 100644 --- a/src/pages/login/login.ts +++ b/src/pages/login/login.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; -import { IonicPage, NavController, NavParams } from 'ionic-angular'; +import { NavController, NavParams } from 'ionic-angular'; import { Storage } from '@ionic/storage'; -import { HomePage } from '../home/home'; +import { StreamPage } from '../stream/stream'; import { OauthCordova } from 'ng2-cordova-oauth/platform/cordova'; // import { OauthBrowser } from 'ng2-cordova-oauth/platform/browser'; @@ -35,7 +35,7 @@ export class LoginPage { console.log('RESULT: ' + JSON.stringify(success)); this.storage.set('token', success['access_token']); pnut.token = success['access_token']; - this.navCtrl.setRoot(HomePage); + this.navCtrl.setRoot(StreamPage, {stream: 'global'}); }, error=> { console.log('ERROR: ' + error); }); diff --git a/src/pages/post-details/post-details.ts b/src/pages/post-details/post-details.ts index 12bb794..5fad493 100644 --- a/src/pages/post-details/post-details.ts +++ b/src/pages/post-details/post-details.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { IonicPage, NavController, NavParams } from 'ionic-angular'; +import { NavController, NavParams } from 'ionic-angular'; /** * Generated class for the PostDetailsPage page. diff --git a/src/pages/stream/stream.html b/src/pages/stream/stream.html index 9a5c225..0ccb410 100644 --- a/src/pages/stream/stream.html +++ b/src/pages/stream/stream.html @@ -18,6 +18,10 @@ + + + + @@ -48,7 +52,7 @@ - @@ -70,15 +74,19 @@
{{ post.counts.replies }}
- +
+ + + +