TootBottomSheet: set document title
This commit is contained in:
parent
8bf133c1cf
commit
eb461d3708
2 changed files with 18 additions and 6 deletions
|
@ -24,6 +24,7 @@ import { css } from "solid-styled";
|
|||
import { vibrate } from "../platform/hardware";
|
||||
import { createTimeSource, TimeSourceProvider } from "../platform/timesrc";
|
||||
import TootComposer from "./TootComposer";
|
||||
import { useDocumentTitle } from "../utils";
|
||||
|
||||
let cachedEntry: [string, mastodon.v1.Status] | undefined;
|
||||
|
||||
|
@ -106,8 +107,14 @@ const TootBottomSheet: Component = (props) => {
|
|||
}
|
||||
});
|
||||
|
||||
useDocumentTitle(() => {
|
||||
const t = toot()?.reblog ?? toot()
|
||||
const name = t?.account.displayName ?? "Someone"
|
||||
return `${name}'s toot`
|
||||
})
|
||||
|
||||
const tootDisplayName = () => {
|
||||
const t = toot();
|
||||
const t = toot()?.reblog ?? toot();
|
||||
if (t) {
|
||||
return resolveCustomEmoji(t.account.displayName, t.account.emojis);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue