This repository has been archived on 2023-11-19. You can view files and clone it, but cannot push or open issues or pull requests.
goober-ionic/src/pages/thread/thread.ts

41 lines
940 B
TypeScript

import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { Storage } from '@ionic/storage';
import * as pnut from 'pnut-butter';
/**
* Generated class for the ThreadPage page.
*
* See http://ionicframework.com/docs/components/#navigation for more info
* on Ionic pages and navigation.
*/
@Component({
selector: 'page-thread',
templateUrl: 'thread.html',
})
export class ThreadPage {
title: string;
posts: Array<Object> = [];
myUsername: string;
hideImg: boolean = false;
ccOnReply: boolean = false;
constructor(public navCtrl: NavController, public navParams: NavParams,
private storage: Storage) {
this.posts = this.navParams.data.posts;
this.myUsername = this.navParams.data.me;
this.storage.get('hideimg').then((val) => {
this.hideImg = val;
});
this.storage.get('cc').then((val) => {
this.ccOnReply = val;
});
}
}