Skip to content

Commit e46aa5f

Browse files
committed
more method renames
1 parent 205e661 commit e46aa5f

39 files changed

+204
-203
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
" newName",
2727
");",
2828
"if (edit) await vscode.workspace.applyEdit(edit);",
29+
"await new Promise(resolve => setTimeout(resolve, 100));",
2930
"await vscode.commands.executeCommand('workbench.action.files.saveAll');"
3031
]
3132
}

__test__/support/environment/TestEnvironment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class TestEnvironment {
3232
) {
3333
mockJsonp();
3434
const oneSignal = initOSGlobals(config);
35-
OneSignal._coreDirector._operationRepo.queue = [];
35+
OneSignal._coreDirector._operationRepo._queue = [];
3636

3737
if (config.initOneSignalId) {
3838
updateIdentityModel('onesignal_id', ONESIGNAL_ID);

__test__/unit/push/registerForPush.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('Register for push', () => {
3232
const promise = OneSignal.User.PushSubscription.optIn();
3333

3434
expect(spy).not.toHaveBeenCalled();
35-
OneSignalEvent.trigger(OneSignal.EVENTS.SDK_INITIALIZED);
35+
OneSignalEvent._trigger(OneSignal.EVENTS.SDK_INITIALIZED);
3636
await promise;
3737
expect(OneSignal._initialized).toBe(true);
3838
expect(spy).toHaveBeenCalledTimes(1);

__test__/unit/pushSubscription/nativePermissionChange.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('Notification Types are set correctly on subscription change', () => {
5050
});
5151
await setDbPermission('granted');
5252

53-
await MainHelper.checkAndTriggerNotificationPermissionChanged();
53+
await MainHelper._checkAndTriggerNotificationPermissionChanged();
5454
expect(triggerNotificationSpy).not.toHaveBeenCalled();
5555
});
5656

@@ -74,7 +74,7 @@ describe('Notification Types are set correctly on subscription change', () => {
7474
permChangeStringListener,
7575
);
7676

77-
await MainHelper.checkAndTriggerNotificationPermissionChanged();
77+
await MainHelper._checkAndTriggerNotificationPermissionChanged();
7878

7979
// should update the db
8080
const dbPermission = await getOptionsValue<NotificationPermission>(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
},
8585
{
8686
"path": "./build/releases/OneSignalSDK.page.es6.js",
87-
"limit": "48.11 kB",
87+
"limit": "47.88 kB",
8888
"gzip": true
8989
},
9090
{

src/core/CoreModuleDirector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class CoreModuleDirector {
117117
SubscriptionModel | undefined
118118
> {
119119
logMethodCall('CoreModuleDirector.getPushSubscriptionModelByCurrentToken');
120-
const pushToken = await MainHelper.getCurrentPushToken();
120+
const pushToken = await MainHelper._getCurrentPushToken();
121121
if (pushToken) {
122122
return this._getSubscriptionOfTypeWithToken(
123123
SubscriptionChannel.Push,

src/core/controllers/CustomEventController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class CustomEventController implements ICustomEventController {
2222
}
2323

2424
_sendCustomEvent(event: ICustomEvent): void {
25-
const appId = MainHelper.getAppId();
25+
const appId = MainHelper._getAppId();
2626
const identityModel = this._identityModelStore.model;
2727

2828
const op = new TrackCustomEventOperation({
@@ -33,6 +33,6 @@ export class CustomEventController implements ICustomEventController {
3333
event,
3434
});
3535

36-
this._opRepo.enqueue(op);
36+
this._opRepo._enqueue(op);
3737
}
3838
}

src/core/listeners/IdentityModelStoreListener.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class IdentityModelStoreListener extends SingletonModelStoreListener<Iden
2626
_oldValue: unknown,
2727
newValue: unknown,
2828
): Operation {
29-
const appId = MainHelper.getAppId();
29+
const appId = MainHelper._getAppId();
3030
if (newValue != null && typeof newValue === 'string') {
3131
return new SetAliasOperation(
3232
appId,

src/core/listeners/ModelStoreListener.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export abstract class ModelStoreListener<TModel extends Model> {
3232

3333
const operation = this._getAddOperation(model);
3434
if (operation != null) {
35-
this._opRepo.enqueue(operation);
35+
this._opRepo._enqueue(operation);
3636
}
3737
}
3838

@@ -48,7 +48,7 @@ export abstract class ModelStoreListener<TModel extends Model> {
4848
args.newValue,
4949
);
5050
if (operation != null) {
51-
this._opRepo.enqueue(operation);
51+
this._opRepo._enqueue(operation);
5252
}
5353
}
5454

@@ -59,7 +59,7 @@ export abstract class ModelStoreListener<TModel extends Model> {
5959

6060
const operation = await this._getRemoveOperation(model);
6161
if (operation != null) {
62-
this._opRepo.enqueue(operation);
62+
this._opRepo._enqueue(operation);
6363
}
6464
}
6565

src/core/listeners/PropertiesModelStoreListener.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class PropertiesModelStoreListener extends SingletonModelStoreListener<Pr
2828
_oldValue: unknown,
2929
newValue: unknown,
3030
): Operation | null {
31-
const appId = MainHelper.getAppId();
31+
const appId = MainHelper._getAppId();
3232

3333
return new SetPropertyOperation(
3434
appId,

0 commit comments

Comments
 (0)