File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,8 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
142
142
[self setExternalUserId: call withResult: result];
143
143
else if ([@" OneSignal#removeExternalUserId" isEqualToString: call.method])
144
144
[self removeExternalUserId: call withResult: result];
145
+ else if ([@" OneSignal#setLanguage" isEqualToString: call.method])
146
+ [self setLanguage: call withResult: result];
145
147
else if ([@" OneSignal#initNotificationOpenedHandlerParams" isEqualToString: call.method])
146
148
[self initNotificationOpenedHandlerParams ];
147
149
else if ([@" OneSignal#initInAppMessageClickedHandlerParams" isEqualToString: call.method])
@@ -320,6 +322,14 @@ - (void)removeExternalUserId:(FlutterMethodCall *)call withResult:(FlutterResult
320
322
}];
321
323
}
322
324
325
+ - (void )setLanguage : (FlutterMethodCall *)call withResult : (FlutterResult)result {
326
+ id language = call.arguments [@" language" ];
327
+ if (language == [NSNull null ])
328
+ language = nil ;
329
+
330
+ [OneSignal setLanguage: language];
331
+ }
332
+
323
333
- (void )initNotificationOpenedHandlerParams {
324
334
[OneSignal setNotificationOpenedHandler: ^(OSNotificationOpenedResult * _Nonnull result) {
325
335
[OneSignalPlugin.sharedInstance handleNotificationOpened: result];
You can’t perform that action at this time.
0 commit comments