fix sw.js
This commit is contained in:
parent
c905219e8c
commit
bf8a4bdbe4
1 changed files with 3 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import { storage } from 'src/lib/storage.js'
|
||||||
import { parseNotification } from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
import { parseNotification } from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||||
import { prepareNotificationObject } from 'src/services/notification_utils/notification_utils.js'
|
import { prepareNotificationObject } from 'src/services/notification_utils/notification_utils.js'
|
||||||
import { cacheKey, emojiCacheKey, shouldCache } from 'src/services/sw/sw.js'
|
import { cacheKey, emojiCacheKey, shouldCache } from 'src/services/sw/sw.js'
|
||||||
|
import { instanceDefaultConfig } from 'src/modules/default_config_state.js'
|
||||||
|
|
||||||
// Collects all messages for service workers
|
// Collects all messages for service workers
|
||||||
// Needed because service workers cannot use dynamic imports
|
// Needed because service workers cannot use dynamic imports
|
||||||
|
|
@ -38,7 +39,8 @@ const setSettings = async () => {
|
||||||
const locale = piniaState.prefsStorage.simple.interfaceLanguage || 'en'
|
const locale = piniaState.prefsStorage.simple.interfaceLanguage || 'en'
|
||||||
i18n.locale = locale
|
i18n.locale = locale
|
||||||
const notificationsNativeArray = Object.entries(
|
const notificationsNativeArray = Object.entries(
|
||||||
piniaState.prefsStorage.simple.notificationNative,
|
piniaState.prefsStorage.simple.notificationNative ||
|
||||||
|
instanceDefaultConfig.notificationNative,
|
||||||
)
|
)
|
||||||
state.webPushAlwaysShowNotifications =
|
state.webPushAlwaysShowNotifications =
|
||||||
piniaState.prefsStorage.simple.webPushAlwaysShowNotifications
|
piniaState.prefsStorage.simple.webPushAlwaysShowNotifications
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue