Skip to content

Commit 0638015

Browse files
committed
rm refresh User on login of same external_id
We already refresh when the app is cold started, so this results in two GET calls back-to-back for apps that call login every time the app is opened the by the user. We are still refreshing the user if switch user happens. Didn't add any unit test since there is no existing test infrastructure to test code in OneSignalImp. Also such code should be refactored out into a different class to make it more testable anyway.
1 parent c00b322 commit 0638015

File tree

1 file changed

+0
-9
lines changed
  • OneSignalSDK/onesignal/core/src/main/java/com/onesignal/internal

1 file changed

+0
-9
lines changed

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/internal/OneSignalImp.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -359,15 +359,6 @@ internal class OneSignalImp : IOneSignal, IServiceProvider {
359359
currentIdentityOneSignalId = identityModelStore!!.model.onesignalId
360360

361361
if (currentIdentityExternalId == externalId) {
362-
// login is for same user that is already logged in, fetch (refresh)
363-
// the current user.
364-
operationRepo!!.enqueue(
365-
RefreshUserOperation(
366-
configModel!!.appId,
367-
identityModelStore!!.model.onesignalId,
368-
),
369-
true,
370-
)
371362
return
372363
}
373364

0 commit comments

Comments
 (0)