TootBottomSheet: added cache
This commit is contained in:
parent
c56c098bdb
commit
368bca9fa1
2 changed files with 20 additions and 3 deletions
|
@ -43,6 +43,7 @@ import PullDownToRefresh from "./PullDownToRefresh";
|
|||
import { HeroSourceProvider, type HeroSource } from "../platform/anim";
|
||||
import { useNavigate } from "@solidjs/router";
|
||||
import { useSignedInProfiles } from "../masto/acct";
|
||||
import { setCache as setTootBottomSheetCache } from "./TootBottomSheet";
|
||||
|
||||
const TimelinePanel: Component<{
|
||||
client: mastodon.rest.Client;
|
||||
|
@ -288,6 +289,7 @@ const Home: ParentComponent = (props) => {
|
|||
const rect = srcElement?.getBoundingClientRect();
|
||||
setHeroSrc((x) => Object.assign({}, x, { [BOTTOM_SHEET_HERO]: rect }));
|
||||
const acct = `${inf.username}@${p.account.site}`;
|
||||
setTootBottomSheetCache(acct, toot);
|
||||
navigate(`/${encodeURIComponent(acct)}/${toot.id}`);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue