show thumbnail by default in timeline but open in browser when clicked. issue #73 and #16

This commit is contained in:
Morgan McMillian 2018-09-02 17:49:21 -07:00
parent ae18ab36cf
commit 284836e0dd
2 changed files with 5 additions and 1 deletions

View file

@ -54,7 +54,7 @@
<div *ngIf="post.raw">
<div *ngFor="let r of post.raw">
<div *ngIf="r.type == 'io.pnut.core.oembed'">
<img src="{{ r.value.url }}">
<ion-item><ion-thumbnail><img src="{{ r.value.thumbnail_url || r.value.url }}" (click)="showImage(r.value.url)"></ion-thumbnail></ion-item>
</div>
</div>
</div>

View file

@ -303,6 +303,10 @@ export class StreamPage {
newPostModal.present();
}
showImage(url) {
window.open(url, '_system');
}
presentToast(text) {
let toast = this.toastCtrl.create({
position: 'top',