refactor: no reactivity transform (#2600)

This commit is contained in:
patak 2024-02-21 16:20:08 +01:00 committed by GitHub
parent b9394c2fa5
commit ccfa7a8d10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
102 changed files with 649 additions and 652 deletions

View file

@ -14,7 +14,7 @@ const supportsPushNotifications = typeof window !== 'undefined'
&& 'getKey' in PushSubscription.prototype
export function usePushManager() {
const { client } = $(useMasto())
const { client } = useMasto()
const isSubscribed = ref(false)
const notificationPermission = ref<PermissionState | undefined>(
Notification.permission === 'denied'
@ -25,7 +25,7 @@ export function usePushManager() {
? 'prompt'
: undefined,
)
const isSupported = $computed(() => supportsPushNotifications)
const isSupported = computed(() => supportsPushNotifications)
const hiddenNotification = useLocalStorage<PushNotificationRequest>(STORAGE_KEY_NOTIFICATION, {})
const configuredPolicy = useLocalStorage<PushNotificationPolicy>(STORAGE_KEY_NOTIFICATION_POLICY, {})
const pushNotificationData = ref(createRawSettings(
@ -173,7 +173,7 @@ export function usePushManager() {
if (policyChanged)
await subscribe(data, policy, true)
else
currentUser.value.pushSubscription = await client.v1.push.subscription.update({ data })
currentUser.value.pushSubscription = await client.value.v1.push.subscription.update({ data })
policyChanged && await nextTick()