forked from coracle/flotilla
Rework subscription storage
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
import {setupAnalytics} from "@app/util/analytics"
|
||||
import {authPolicy, blockPolicy, trustPolicy, mostlyRestrictedPolicy} from "@app/util/policies"
|
||||
import {kv, db} from "@app/core/storage"
|
||||
import {userSettingsValues} from "@app/core/state"
|
||||
import {userSettingsValues, notificationSettings} from "@app/core/state"
|
||||
import {syncApplicationData} from "@app/core/sync"
|
||||
import * as commands from "@app/core/commands"
|
||||
import * as requests from "@app/core/requests"
|
||||
@@ -44,17 +44,6 @@
|
||||
|
||||
const policies = [authPolicy, blockPolicy, trustPolicy, mostlyRestrictedPolicy]
|
||||
|
||||
PushNotifications.addListener(
|
||||
"pushNotificationActionPerformed",
|
||||
async (action: ActionPerformed) => {
|
||||
console.log('====== action', JSON.stringify(action))
|
||||
const event = parseJson(action.notification.data.event)
|
||||
const relays = [action.notification.data.relay]
|
||||
|
||||
goto(await getEventPath(event, relays))
|
||||
},
|
||||
)
|
||||
|
||||
// Add stuff to window for convenience
|
||||
Object.assign(window, {
|
||||
get,
|
||||
@@ -114,6 +103,11 @@
|
||||
store: shouldUnwrap,
|
||||
storage: kv,
|
||||
}),
|
||||
sync({
|
||||
key: "notificationSettings",
|
||||
store: notificationSettings,
|
||||
storage: kv,
|
||||
}),
|
||||
])
|
||||
|
||||
// Set up our storage adapters
|
||||
|
||||
Reference in New Issue
Block a user