Skip to content

Commit b213c03

Browse files
committed
remove "removeLegacySubscriptionOptions" logic
1 parent 53c4b7a commit b213c03

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

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": "46.154 kB",
87+
"limit": "46.124 kB",
8888
"gzip": true
8989
},
9090
{

src/onesignal/OneSignal.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ import {
2222
} from 'src/shared/helpers/init';
2323
import {
2424
getConsentRequired,
25-
removeLegacySubscriptionOptions,
2625
setConsentRequired as setStorageConsentRequired,
2726
} from 'src/shared/helpers/localStorage';
2827
import { checkAndTriggerNotificationPermissionChanged } from 'src/shared/helpers/main';
28+
import { debug, info, warn } from 'src/shared/libraries/log';
2929
import {
3030
_onSubscriptionChanged,
3131
checkAndTriggerSubscriptionChanged,
@@ -45,7 +45,6 @@ import NotificationsNamespace from './NotificationsNamespace';
4545
import { SessionNamespace } from './SessionNamespace';
4646
import SlidedownNamespace from './SlidedownNamespace';
4747
import UserNamespace from './UserNamespace';
48-
import { debug, info, warn } from 'src/shared/libraries/log';
4948

5049
export default class OneSignal {
5150
static _consentGiven = false;
@@ -127,11 +126,7 @@ export default class OneSignal {
127126
*/
128127
static async init(options: AppUserConfig) {
129128
logMethodCall('init');
130-
debug(
131-
`Browser Environment: ${getBrowserName()} ${getBrowserVersion()}`,
132-
);
133-
134-
removeLegacySubscriptionOptions();
129+
debug(`Browser Environment: ${getBrowserName()} ${getBrowserVersion()}`);
135130

136131
errorIfInitAlreadyCalled();
137132
await OneSignal._initializeConfig(options);

src/shared/helpers/localStorage.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
1-
const IS_OPTED_OUT = 'isOptedOut';
2-
const IS_PUSH_NOTIFICATIONS_ENABLED = 'isPushNotificationsEnabled';
31
const PAGE_VIEWS = 'os_pageViews';
42
const REQUIRES_PRIVACY_CONSENT = 'requiresPrivacyConsent';
53

6-
/**
7-
* Used in OneSignal initialization to dedupe local storage subscription options already being saved to IndexedDB.
8-
* We will eventually be able to remove this function.
9-
*/
10-
export function removeLegacySubscriptionOptions(): void {
11-
localStorage.removeItem(IS_OPTED_OUT);
12-
localStorage.removeItem(IS_PUSH_NOTIFICATIONS_ENABLED);
13-
}
14-
154
export function setConsentRequired(value: boolean): void {
165
localStorage.setItem(REQUIRES_PRIVACY_CONSENT, value.toString());
176
}

0 commit comments

Comments
 (0)