Skip to content

Commit

Permalink
Fix open method signiture for react-native-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlntn committed Feb 23, 2017
1 parent 62a3141 commit fc74108
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules"
]
}
6 changes: 3 additions & 3 deletions windows/RNShare/RNShareModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public override string Name
/// </summary>
/// <param name="options"></param>
[ReactMethod]
public void open(JObject options, ICallback callback)
public void open(JObject options, ICallback errorCallback, ICallback successCallback)
{
if (options != null)
{
Expand All @@ -69,11 +69,11 @@ public void open(JObject options, ICallback callback)
try
{
DataTransferManager.ShowShareUI();
callback.Invoke("OK");
successCallback.Invoke("OK");
}
catch
{
callback.Invoke("not_available");
errorCallback.Invoke("not_available");
}
});
}
Expand Down

0 comments on commit fc74108

Please sign in to comment.