|
@@ -1,11 +1,6 @@
|
|
|
import { Component, Input } from "@angular/core";
|
|
|
+import { PhotoViewer } from "@ionic-native/photo-viewer";
|
|
|
|
|
|
-
|
|
|
- * Generated class for the QuotedStatusComponent component.
|
|
|
- *
|
|
|
- * See https:
|
|
|
- * Components.
|
|
|
- */
|
|
|
@Component({
|
|
|
selector: "quoted-status",
|
|
|
templateUrl: "quoted-status.html"
|
|
@@ -14,7 +9,7 @@ export class QuotedStatusComponent {
|
|
|
@Input()
|
|
|
data: any[];
|
|
|
|
|
|
- constructor() {}
|
|
|
+ constructor(private photoViewer: PhotoViewer) {}
|
|
|
|
|
|
get hasPhoto() {
|
|
|
return (
|
|
@@ -22,4 +17,8 @@ export class QuotedStatusComponent {
|
|
|
this.data["entities"]["media"][0]["type"] == "photo"
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
+ showPhoto(url: string) {
|
|
|
+ this.photoViewer.show(url, null, { share: true });
|
|
|
+ }
|
|
|
}
|