Skip to content

Commit

Permalink
fix(socialsharing): all methods return Promises now
Browse files Browse the repository at this point in the history
closes #275
  • Loading branch information
ihadeed committed Jul 11, 2016
1 parent fa47213 commit e150224
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/plugins/socialsharing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ export class SocialSharing {
* @param file {string|Array<string>} URL(s) to file(s) or image(s), local path(s) to file(s) or image(s), or base64 data of an image. Only the first file/image will be used on Windows Phone.
* @param url {string} A URL to share
*/
@Cordova({
sync: true
})
static share (message?: string, subject?: string, file?: string|Array<string>, url?: string): void {}
@Cordova()
static share (message?: string, subject?: string, file?: string|Array<string>, url?: string): Promise<any> {return; }

/**
* Shares using the share sheet with additional options and returns a result object or an error message (requires plugin version 5.1.0+)
Expand All @@ -58,10 +56,9 @@ export class SocialSharing {
* @param url
*/
@Cordova({
sync: true,
platforms: ['iOS', 'Android']
})
static shareViaTwitter (message: string, image?: string, url?: string): void {}
static shareViaTwitter (message: string, image?: string, url?: string): Promise<any> {return; }

/**
* Shares directly to Facebook
Expand Down

0 comments on commit e150224

Please sign in to comment.