TimelinePanel: now can close expaneded toot

This commit is contained in:
thislight 2024-08-17 15:44:25 +08:00
parent 49576c0688
commit bd1a515ef8

View file

@ -146,7 +146,7 @@ const TimelinePanel: Component<{
expanded={item.id === expandedThreadId() ? 1 : 0} expanded={item.id === expandedThreadId() ? 1 : 0}
onExpandChange={(x) => { onExpandChange={(x) => {
if (item.id !== expandedThreadId()) { if (item.id !== expandedThreadId()) {
setExpandedThreadId(item.id); setExpandedThreadId((x) => (x ? undefined : item.id));
} else if (x === 2) { } else if (x === 2) {
props.openFullScreenToot(item, element); props.openFullScreenToot(item, element);
} }
@ -205,8 +205,8 @@ const Home: ParentComponent = (props) => {
} }
}; };
const client = () => { const client = () => {
const all = profiles() const all = profiles();
return all?.[0]?.client return all?.[0]?.client;
}; };
const navigate = useNavigate(); const navigate = useNavigate();