refactor: no reactivity transform (#2600)
This commit is contained in:
parent
b9394c2fa5
commit
ccfa7a8d10
102 changed files with 649 additions and 652 deletions
|
@ -121,7 +121,7 @@ export function useSelfAccount(user: MaybeRefOrGetter<mastodon.v1.Account | unde
|
|||
export const characterLimit = computed(() => currentInstance.value?.configuration?.statuses.maxCharacters ?? DEFAULT_POST_CHARS_LIMIT)
|
||||
|
||||
export async function loginTo(masto: ElkMasto, user: Overwrite<UserLogin, { account?: mastodon.v1.AccountCredentials }>) {
|
||||
const { client } = $(masto)
|
||||
const { client } = masto
|
||||
const instance = mastoLogin(masto, user)
|
||||
|
||||
// GoToSocial only API
|
||||
|
@ -145,11 +145,11 @@ export async function loginTo(masto: ElkMasto, user: Overwrite<UserLogin, { acco
|
|||
currentUserHandle.value = account.acct
|
||||
|
||||
const [me, pushSubscription] = await Promise.all([
|
||||
fetchAccountInfo(client, user.server),
|
||||
fetchAccountInfo(client.value, user.server),
|
||||
// if PWA is not enabled, don't get push subscription
|
||||
useAppConfig().pwaEnabled
|
||||
// we get 404 response instead empty data
|
||||
? client.v1.push.subscription.fetch().catch(() => Promise.resolve(undefined))
|
||||
? client.value.v1.push.subscription.fetch().catch(() => Promise.resolve(undefined))
|
||||
: Promise.resolve(undefined),
|
||||
])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue