diff --git a/src/pages/settings/settings.html b/src/pages/settings/settings.html index b8ba373..cbb2a96 100644 --- a/src/pages/settings/settings.html +++ b/src/pages/settings/settings.html @@ -40,5 +40,13 @@ + + +

Hide images

+

Hide images in posts

+
+ +
+ diff --git a/src/pages/settings/settings.ts b/src/pages/settings/settings.ts index 7f5d93c..6c6affd 100644 --- a/src/pages/settings/settings.ts +++ b/src/pages/settings/settings.ts @@ -18,6 +18,7 @@ export class SettingsPage { private set_unified: boolean; private set_cc: boolean; private set_default: string; + private set_hideimg: boolean; constructor(public navCtrl: NavController, private storage: Storage, public navParams: NavParams, public events: Events) { @@ -41,6 +42,12 @@ export class SettingsPage { }).catch(err => { console.log('ERROR: ' + err); }); + + this.storage.get('hideimg').then((val) => { + this.set_hideimg = val; + }).catch(err => { + console.log('ERROR: ' + err); + }); } ionViewDidLeave() { @@ -59,4 +66,8 @@ export class SettingsPage { this.storage.set('timeline', this.set_default); } + updateHideImg() { + this.storage.set('hideimg', this.set_hideimg); + } + } diff --git a/src/pages/stream/stream.html b/src/pages/stream/stream.html index a900c9f..0412d50 100644 --- a/src/pages/stream/stream.html +++ b/src/pages/stream/stream.html @@ -54,7 +54,18 @@
- + +
+ + + + + + +
diff --git a/src/pages/stream/stream.ts b/src/pages/stream/stream.ts index a96689a..e0d9407 100644 --- a/src/pages/stream/stream.ts +++ b/src/pages/stream/stream.ts @@ -33,6 +33,7 @@ export class StreamPage { showScrollBtn: boolean = false; showUnified: boolean; ccOnReply: boolean = false; + hideImg: boolean = false; constructor(public navCtrl: NavController, public navParams: NavParams, public modalCtrl: ModalController, private changeDetectorRef: ChangeDetectorRef, public toastCtrl: ToastController, private storage: Storage, @@ -43,6 +44,10 @@ export class StreamPage { this.ccOnReply = val; }); + this.storage.get('hideimg').then((val) => { + this.hideImg = val; + }); + this.storage.get('unified').then((val) => { this.showUnified = val;