Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 5d8f5dc

Browse files
committed
Only show instagram button if instagram app is installed
1 parent 6c0dd07 commit 5d8f5dc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

source/ChuView.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ enyo.kind({
8888
this.$.likeButton.addRemoveClass("active", this.chu.get("liked"));
8989

9090
this.$.shareControls.setShowing(this.chu.get("visibility") == "public");
91+
this.$.instagramButton.setShowing(false);
92+
if (Instagram) {
93+
Instagram.isInstalled(enyo.bind(this, function(err, installed) {
94+
this.$.instagramButton.setShowing(installed);
95+
}));
96+
}
9197
},
9298
/**
9399
Configures the image view to the right zoom and scroll position to allow parallax scrolling
@@ -432,7 +438,7 @@ enyo.kind({
432438
{classes: "header-icon messaging", ontap: "sms"},
433439
{classes: "header-icon facebook", name: "facebookButton", ontap: "facebook"},
434440
{classes: "header-icon twitter", ontap: "twitter"},
435-
{classes: "header-icon instagram", ontap: "instagram"}
441+
{classes: "header-icon instagram", ontap: "instagram", name: "instagramButton"}
436442
]}
437443
]},
438444
{fit: true, name: "contentContainer", style: "position: relative; overflow: hidden;", components: [

0 commit comments

Comments
 (0)