Skip to content

Commit d4b0aca

Browse files
author
Vistaus
committed
Added sharing to Quick Post and release 3.5.0
1 parent d7d6a4c commit d4b0aca

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

images/icons/quickpost-32x32.png

1.7 KB
Loading

source/ShareLinkDialog.js

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,15 @@ enyo.kind({
4141
type: "facebook",
4242
exists: true
4343
},{
44-
title: "Macaw",
45-
image: "images/icons/sparrow-32x32.png",
44+
title: "Project Macaw",
45+
image: "images/icons/macaw-32x32.png",
4646
type: "macaw",
4747
exists: true
48+
},{
49+
title: "Quick Post",
50+
image: "images/icons/quickpost-32x32.png",
51+
type: "quickpost",
52+
exists: true
4853
}],
4954
components: [{
5055
name: "appCatalogService",
@@ -174,6 +179,8 @@ enyo.kind({
174179
this.shareLinkViaSparrow();
175180
} else if (shareServiceType === "macaw") {
176181
this.shareLinkViaMacaw();
182+
} else if (shareServiceType === "quickpost") {
183+
this.shareLinkViaQuickpost();
177184
}
178185
this.close();
179186
},
@@ -215,6 +222,12 @@ enyo.kind({
215222
};
216223
this.$.launchApplicationService.call({id: "net.minego.phnx", params: params});
217224
},
225+
shareLinkViaQuickpost: function () {
226+
var params = {
227+
quickPost: $L("Check out this web page: ") + this.url
228+
}
229+
this.$.launchApplicationService.call({id: "com.hedami.quickpost", params: params});
230+
},
218231
downloadFacebookApp: function () {
219232
this.log("Launching app catalog to download facebook");
220233
this.$.appCatalogService.call({id: "com.palm.app.enyo-findapps", params: {
@@ -310,6 +323,33 @@ enyo.kind({
310323
this.$.shareList.renderRow(index);
311324
}
312325
}, this);
326+
}
327+
328+
foundQuickpost = apps.some(function (app) {
329+
this.log(enyo.json.stringify(app));
330+
if (app.id === "com.hedami.quickpost") {
331+
332+
333+
this.SHARE_LINK_LIST.some(function (shareService, index) {
334+
if (shareService.title === "Quick Post") {
335+
shareService.exists = true;
336+
shareService.checkExistance = false;
337+
this.$.shareList.renderRow(index);
338+
}
339+
}, this);
340+
return true;
341+
}
342+
}, this);
343+
344+
345+
if (!foundQuickpost) {
346+
this.SHARE_LINK_LIST.some(function (shareService, index) {
347+
if (shareService.title === "Quick Post") {
348+
shareService.exists = false;
349+
shareService.checkExistance = false;
350+
this.$.shareList.renderRow(index);
351+
}
352+
}, this);
313353
}
314354
},
315355
launchAppCatalogSuccess: function (inSender, inResponse) {

0 commit comments

Comments
 (0)