Skip to content

Commit 6944777

Browse files
committed
Add OneSignal.setLanguage addTaskToQueue logic
1 parent 2750d61 commit 6944777

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/OneSignal.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,12 @@ public void run() {
15941594
};
15951595
runSetLanguage.run();
15961596

1597+
// If either the app context is null or the waiting queue isn't done (to preserve operation order)
1598+
if (appContext == null || shouldRunTaskThroughQueue()) {
1599+
addTaskToQueue(new PendingTaskRunnable(runSetExternalUserId));
1600+
return;
1601+
}
1602+
15971603
if (shouldLogUserPrivacyConsentErrorMessageForMethodName("setLanguage()"))
15981604
return;
15991605

0 commit comments

Comments
 (0)