Skip to content

Commit

Permalink
Cleaned up duplicated ServiceWorkerHelper name
Browse files Browse the repository at this point in the history
* renamed helpers/page/ServiceWorkerHelper to helpers/page/ServiceWorkerUtilHelper.
* There was another `ServiceWorkerHelper` class under just /helpers/
and this was creating some confussion.
  • Loading branch information
jkasten2 committed Feb 17, 2021
1 parent 403d118 commit 8d69de5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Log from "../../libraries/Log";

export default class ServiceWorkerHelper {
export default class ServiceWorkerUtilHelper {
// Get the service worker based on a scope as a domain can have none to many service workers.
static async getRegistration(scope: string): Promise<ServiceWorkerRegistration | null | undefined> {
try {
Expand Down
4 changes: 2 additions & 2 deletions src/managers/ServiceWorkerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import ServiceWorkerHelper, { ServiceWorkerActiveState, ServiceWorkerManagerConf
import { ContextSWInterface } from '../models/ContextSW';
import { Utils } from "../context/shared/utils/Utils";
import { PageVisibilityRequest, PageVisibilityResponse } from "../models/Session";
import PageServiceWorkerHelper from "../helpers/page/ServiceWorkerHelper";
import ServiceWorkerUtilHelper from "../helpers/page/ServiceWorkerUtilHelper";

export class ServiceWorkerManager {
private context: ContextSWInterface;
Expand All @@ -30,7 +30,7 @@ export class ServiceWorkerManager {

// Gets details on the OneSignal service-worker (if any)
public async getRegistration(): Promise<ServiceWorkerRegistration | null | undefined> {
return await PageServiceWorkerHelper.getRegistration(this.config.registrationOptions.scope);
return await ServiceWorkerUtilHelper.getRegistration(this.config.registrationOptions.scope);
}

public async getActiveState(): Promise<ServiceWorkerActiveState> {
Expand Down

0 comments on commit 8d69de5

Please sign in to comment.