From c16e9bd8e11d0cc5e964ee2ce49adee576624e4c Mon Sep 17 00:00:00 2001 From: Shepherd Date: Fri, 16 Feb 2024 18:55:50 -0500 Subject: [PATCH] Fix lint errors --- src/page/models/UserChangeEvent.ts | 14 +++++++------- src/shared/helpers/EventHelper.ts | 11 ++++++----- src/shared/services/Database.ts | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/page/models/UserChangeEvent.ts b/src/page/models/UserChangeEvent.ts index 3f2522fe7..8caaad393 100644 --- a/src/page/models/UserChangeEvent.ts +++ b/src/page/models/UserChangeEvent.ts @@ -1,10 +1,10 @@ type UserNamespaceProperties = { - onesignalId: string | undefined; - externalId: string | undefined; - }; + onesignalId: string | undefined; + externalId: string | undefined; +}; - type UserChangeEvent = { - current: UserNamespaceProperties; - }; +type UserChangeEvent = { + current: UserNamespaceProperties; +}; - export default UserChangeEvent; +export default UserChangeEvent; diff --git a/src/shared/helpers/EventHelper.ts b/src/shared/helpers/EventHelper.ts index d2b8ffdd6..1d6c8e39c 100755 --- a/src/shared/helpers/EventHelper.ts +++ b/src/shared/helpers/EventHelper.ts @@ -227,7 +227,11 @@ export default class EventHelper { } static triggerUserChanged(change: UserChangeEvent) { - OneSignalEvent.trigger(OneSignal.EVENTS.SUBSCRIPTION_CHANGED, change, UserNamespace.emitter); + OneSignalEvent.trigger( + OneSignal.EVENTS.SUBSCRIPTION_CHANGED, + change, + UserNamespace.emitter, + ); } static triggerNotificationClick( @@ -326,10 +330,7 @@ export default class EventHelper { OneSignalUtils.logMethodCall('checkAndTriggerUserChanged'); const userState = await Database.getUserState(); - const { - previousOneSignalId, - previousExternalId, - } = userState; + const { previousOneSignalId, previousExternalId } = userState; const identityModel = await OneSignal.coreDirector.getIdentityModel(); const currentOneSignalId = identityModel?.onesignalId; diff --git a/src/shared/services/Database.ts b/src/shared/services/Database.ts index 6a81315f8..3338a7567 100644 --- a/src/shared/services/Database.ts +++ b/src/shared/services/Database.ts @@ -249,8 +249,8 @@ export default class Database { async getUserState(): Promise { const userState = new UserState(); - userState.previousOneSignalId = ""; - userState.previousExternalId = ""; + userState.previousOneSignalId = ''; + userState.previousExternalId = ''; // previous are used to track changes to the user's state. // Displayed in the `current` & `previous` fields of the `userChange` event. userState.previousOneSignalId = await this.get(