@@ -247,15 +247,12 @@ internal class OneSignalImp : IOneSignal, IServiceProvider {
247
247
startupService = services.getService()
248
248
startupService!! .bootstrap()
249
249
250
- forceCreateUser = true ;
251
250
if (forceCreateUser || ! identityModelStore!! .model.hasProperty(IdentityConstants .ONESIGNAL_ID )) {
252
- var legacyPlayerId =
251
+ val legacyPlayerId =
253
252
preferencesService!! .getString(
254
253
PreferenceStores .ONESIGNAL ,
255
254
PreferenceOneSignalKeys .PREFS_LEGACY_PLAYER_ID ,
256
255
)
257
- // creating a non-null legacyPlayerId
258
- legacyPlayerId = " temp" ;
259
256
if (legacyPlayerId == null ) {
260
257
Logging .debug(" initWithContext: creating new device-scoped user" )
261
258
createAndSwitchToNewUser()
@@ -272,15 +269,13 @@ internal class OneSignalImp : IOneSignal, IServiceProvider {
272
269
// Converting a 4.x SDK to the 5.x SDK. We pull the legacy user sync values to create the subscription model, then enqueue
273
270
// a specialized `LoginUserFromSubscriptionOperation`, which will drive fetching/refreshing of the local user
274
271
// based on the subscription ID we do have.
275
- var legacyUserSyncString =
272
+ val legacyUserSyncString =
276
273
preferencesService!! .getString(
277
274
PreferenceStores .ONESIGNAL ,
278
275
PreferenceOneSignalKeys .PREFS_LEGACY_USER_SYNCVALUES ,
279
276
)
280
277
var suppressBackendOperation = false
281
278
282
- // creating a non-null legacyUserSyncString
283
- legacyUserSyncString = " {name: test}" ;
284
279
if (legacyUserSyncString != null ) {
285
280
val legacyUserSyncJSON = JSONObject (legacyUserSyncString)
286
281
val notificationTypes = legacyUserSyncJSON.safeInt(" notification_types" )
0 commit comments