Skip to content

Commit ef3758b

Browse files
committed
never set OperationRepo.enqueue's flush to true
OneSignal.login() was setting OperationRepo.enqueue to true, while this means the OneSignal backend is updated up to 5 seconds faster it means a possible increase in load, as not having a delay means we may not have batched as many network requests. There is a high chance we will re-introduce the flush via a new public commit() method, so it wasn't remove in this commit. But before doing so we need budget rules so it can't be abused. One oddly I notice here is the login had a flush, but the logout did not. This seems like a bug, but either way we don't want to flush anywhere now.
1 parent 8001c6e commit ef3758b

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/operations/impl/OperationRepo.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ internal class OperationRepo(
110110
return waiter.waitForWake()
111111
}
112112

113+
// WARNING: Never set to true, until budget rules are added, even for internal use!
113114
private fun internalEnqueue(
114115
queueItem: OperationQueueItem,
115116
flush: Boolean,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ internal class OneSignalImp : IOneSignal, IServiceProvider {
380380
externalId,
381381
if (currentIdentityExternalId == null) currentIdentityOneSignalId else null,
382382
),
383-
true,
384383
)
385384

386385
if (!result) {
@@ -395,7 +394,6 @@ internal class OneSignalImp : IOneSignal, IServiceProvider {
395394
configModel!!.appId,
396395
identityModelStore!!.model.onesignalId,
397396
),
398-
true,
399397
)
400398
}
401399
}

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/internal/migrations/RecoverFromDroppedLoginBug.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ class RecoverFromDroppedLoginBug(
7979
_identityModelStore.model.externalId,
8080
null,
8181
),
82-
true,
8382
)
8483
}
8584
}

0 commit comments

Comments
 (0)