This commit is contained in:
parent
b7531864d2
commit
9e97f9b611
4 changed files with 9 additions and 17 deletions
|
@ -5,18 +5,15 @@ import {
|
|||
ErrorBoundary,
|
||||
type Ref,
|
||||
createSelector,
|
||||
createRenderEffect,
|
||||
} from "solid-js";
|
||||
import { type mastodon } from "masto";
|
||||
import { vibrate } from "../platform/hardware";
|
||||
import Thread from "./Thread.jsx";
|
||||
import { useDefaultSession } from "../masto/clients";
|
||||
import { useHeroSignal, useHeroSource } from "../platform/anim";
|
||||
import { useHeroSource } from "../platform/anim";
|
||||
import { HERO as BOTTOM_SHEET_HERO } from "../material/BottomSheet";
|
||||
import { setCache as setTootBottomSheetCache } from "./TootBottomSheet";
|
||||
import { useNavigate } from "@solidjs/router";
|
||||
import { createElementSize } from "@solid-primitives/resize-observer";
|
||||
import "./toot-list.css"
|
||||
|
||||
const TootList: Component<{
|
||||
ref?: Ref<HTMLDivElement>;
|
||||
|
@ -113,22 +110,13 @@ const TootList: Component<{
|
|||
openFullScreenToot(status, element, true);
|
||||
};
|
||||
|
||||
const listenElementHeight = (
|
||||
e: HTMLElement,
|
||||
updateHeight: (height: number) => void,
|
||||
) => {
|
||||
const size = createElementSize(e);
|
||||
|
||||
createRenderEffect(() => updateHeight(size.height));
|
||||
};
|
||||
|
||||
return (
|
||||
<ErrorBoundary
|
||||
fallback={(err, reset) => {
|
||||
return <p>Oops: {String(err)}</p>;
|
||||
}}
|
||||
>
|
||||
<div ref={props.ref}>
|
||||
<div ref={props.ref} class="toot-list">
|
||||
<For each={props.threads}>
|
||||
{(itemId, index) => {
|
||||
const path = props.onUnknownThread(itemId)!;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue