BottomSheet: backward animation
This commit is contained in:
parent
6e014324de
commit
80de0e52ee
9 changed files with 150 additions and 75 deletions
|
@ -3,18 +3,6 @@ import type { mastodon } from "masto";
|
|||
import { useSessions } from "./clients";
|
||||
import { updateAcctInf } from "../accounts/stores";
|
||||
|
||||
export function useAcctProfile(client: Accessor<mastodon.rest.Client>) {
|
||||
return createResource(
|
||||
client,
|
||||
(client) => {
|
||||
return client.v1.accounts.verifyCredentials();
|
||||
},
|
||||
{
|
||||
name: "MastodonAccountProfile",
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export function useSignedInProfiles() {
|
||||
const sessions = useSessions();
|
||||
const [accessor, tools] = createResource(sessions, async (all) => {
|
||||
|
@ -24,11 +12,11 @@ export function useSignedInProfiles() {
|
|||
});
|
||||
return [
|
||||
() => {
|
||||
if (accessor.loading) {
|
||||
accessor();
|
||||
const value = accessor();
|
||||
if (!value) {
|
||||
return sessions().map((x) => ({ ...x, inf: x.account.inf }));
|
||||
}
|
||||
return accessor();
|
||||
return value;
|
||||
},
|
||||
tools,
|
||||
] as const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue