TootComposer: don't switch the random placeholder
This commit is contained in:
parent
3dc2196f1a
commit
4fa7449d71
2 changed files with 7 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/package",
|
"$schema": "https://json.schemastore.org/package",
|
||||||
"name": "tutu",
|
"name": "tutu",
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"description": "",
|
"description": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import {
|
import {
|
||||||
createEffect,
|
createEffect,
|
||||||
|
createMemo,
|
||||||
createSignal,
|
createSignal,
|
||||||
createUniqueId,
|
createUniqueId,
|
||||||
onMount,
|
onMount,
|
||||||
|
@ -212,6 +213,10 @@ const TootComposer: Component<{
|
||||||
const [langPickerOpen, setLangPickerOpen] = createSignal(false);
|
const [langPickerOpen, setLangPickerOpen] = createSignal(false);
|
||||||
const appLanguage = useLanguage();
|
const appLanguage = useLanguage();
|
||||||
|
|
||||||
|
const randomPlaceholder = createMemo(() =>
|
||||||
|
randomChoose(Math.random(), ["What's happening?", "What do your think?"]),
|
||||||
|
);
|
||||||
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
const lang = appLanguage().split("-")[0];
|
const lang = appLanguage().split("-")[0];
|
||||||
setLanguage(lang);
|
setLanguage(lang);
|
||||||
|
@ -311,10 +316,7 @@ const TootComposer: Component<{
|
||||||
placeholder={
|
placeholder={
|
||||||
props.replyToDisplayName
|
props.replyToDisplayName
|
||||||
? `Reply to ${props.replyToDisplayName}...`
|
? `Reply to ${props.replyToDisplayName}...`
|
||||||
: randomChoose(Math.random(), [
|
: randomPlaceholder()
|
||||||
"What's happening?",
|
|
||||||
"What do your think?",
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
style={{ width: "100%", border: "none" }}
|
style={{ width: "100%", border: "none" }}
|
||||||
disabled={sending()}
|
disabled={sending()}
|
||||||
|
|
Loading…
Reference in a new issue