mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-08 01:45:28 +00:00
chore: update typing indicator to at least use display name
This commit is contained in:
@@ -76,7 +76,9 @@ export default observer(({ channel }: Props) => {
|
|||||||
if (users.length >= 5) {
|
if (users.length >= 5) {
|
||||||
text = <Text id="app.main.channel.typing.several" />;
|
text = <Text id="app.main.channel.typing.several" />;
|
||||||
} else if (users.length > 1) {
|
} else if (users.length > 1) {
|
||||||
const userlist = [...users].map((x) => x!.username);
|
const userlist = [...users].map(
|
||||||
|
(x) => x!.display_name ?? x!.username,
|
||||||
|
);
|
||||||
const user = userlist.pop();
|
const user = userlist.pop();
|
||||||
|
|
||||||
text = (
|
text = (
|
||||||
@@ -92,7 +94,9 @@ export default observer(({ channel }: Props) => {
|
|||||||
text = (
|
text = (
|
||||||
<Text
|
<Text
|
||||||
id="app.main.channel.typing.single"
|
id="app.main.channel.typing.single"
|
||||||
fields={{ user: users[0]!.username }}
|
fields={{
|
||||||
|
user: users[0]!.display_name ?? users[0]!.username,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user