diff --git a/src/masto/timelines.ts b/src/masto/timelines.ts
index 06471df..37383e9 100644
--- a/src/masto/timelines.ts
+++ b/src/masto/timelines.ts
@@ -190,7 +190,7 @@ function checkOrCreatePager(
newDirection: TimelineFetchDirection,
) {
if (!lastPager) {
- return timeline.list({ }).setDirection(newDirection);
+ return timeline.list({}).setDirection(newDirection);
} else {
let pager = lastPager;
if (pager.getDirection() !== newDirection) {
@@ -261,6 +261,7 @@ export function createTimeline(
if (!chk) {
return;
}
+
console.debug("fetched chunk", chk);
batch(() => {
diff --git a/src/timelines/Home.tsx b/src/timelines/Home.tsx
index 49119da..91ba685 100644
--- a/src/timelines/Home.tsx
+++ b/src/timelines/Home.tsx
@@ -270,7 +270,9 @@ const Home: ParentComponent = (props) => {
- {child()}
+ navigate(-1)}>
+ {child()}
+
diff --git a/src/timelines/RegularToot.tsx b/src/timelines/RegularToot.tsx
index 1c9eb60..2042618 100644
--- a/src/timelines/RegularToot.tsx
+++ b/src/timelines/RegularToot.tsx
@@ -111,13 +111,17 @@ type TootActionGroupProps = {
onRetoot?: (value: T) => void;
onFavourite?: (value: T) => void;
onBookmark?: (value: T) => void;
- onReply?: (value: T) => void;
+ onReply?: (
+ value: T,
+ event: MouseEvent & { currentTarget: HTMLButtonElement },
+ ) => void;
};
type TootCardProps = {
status: mastodon.v1.Status;
actionable?: boolean;
evaluated?: boolean;
+ thread?: "top" | "bottom" | "middle";
} & TootActionGroupProps &
JSX.HTMLElementTags["article"];
@@ -125,19 +129,40 @@ function isolatedCallback(e: MouseEvent) {
e.stopPropagation();
}
+export function findRootToot(element: HTMLElement) {
+ let current: HTMLElement | null = element;
+ while (current && !current.classList.contains(tootStyle.toot)) {
+ current = current.parentElement;
+ }
+ if (!current) {
+ throw Error(
+ `the element must be placed under a element with ${tootStyle.toot}`,
+ );
+ }
+ return current;
+}
+
function TootActionGroup(
props: TootActionGroupProps & { value: T },
) {
+ let actGrpElement: HTMLDivElement;
const toot = () => props.value;
return (
-
-
+
+
+
+
+