Skip to content

Commit c9c586e

Browse files
committed
Android User bridge methods should resolve
* A few methods were missing the `replySuccess` to resolve the call from the app developer.
1 parent d29daef commit c9c586e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

android/src/main/java/com/onesignal/flutter/OneSignalUser.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ private void setLanguage(MethodCall call, Result result) {
5858
language = null;
5959
}
6060
OneSignal.getUser().setLanguage(language);
61+
replySuccess(result, null);
6162
}
6263

6364
private void addAliases(MethodCall call, Result result) {
6465
// call.arguments is being casted to a Map<String, Object> so a try-catch with
6566
// a ClassCastException will be thrown
6667
try {
6768
OneSignal.getUser().addAliases((Map<String, String>) call.arguments);
69+
replySuccess(result, null);
6870
} catch(ClassCastException e) {
6971
replyError(result, "OneSignal", "addAliases failed with error: " + e.getMessage() + "\n" + e.getStackTrace(), null);
7072
}
@@ -75,6 +77,7 @@ private void removeAliases(MethodCall call, Result result) {
7577
// a ClassCastException will be thrown
7678
try {
7779
OneSignal.getUser().removeAliases((List<String>) call.arguments);
80+
replySuccess(result, null);
7881
} catch(ClassCastException e) {
7982
replyError(result, "OneSignal", "removeAliases failed with error: " + e.getMessage() + "\n" + e.getStackTrace(), null);
8083
}
@@ -105,6 +108,7 @@ private void addTags(MethodCall call, Result result) {
105108
// a ClassCastException will be thrown
106109
try {
107110
OneSignal.getUser().addTags((Map<String, String>) call.arguments);
111+
replySuccess(result, null);
108112
} catch(ClassCastException e) {
109113
replyError(result, "OneSignal", "addTags failed with error: " + e.getMessage() + "\n" + e.getStackTrace(), null);
110114
}
@@ -115,6 +119,7 @@ private void removeTags(MethodCall call, Result result) {
115119
// a ClassCastException will be thrown
116120
try {
117121
OneSignal.getUser().removeTags((List<String>) call.arguments);
122+
replySuccess(result, null);
118123
} catch(ClassCastException e) {
119124
replyError(result, "OneSignal", "deleteTags failed with error: " + e.getMessage() + "\n" + e.getStackTrace(), null);
120125
}

0 commit comments

Comments
 (0)