Apply prettier formatting

This commit is contained in:
Michael Weimann 2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
No known key found for this signature in database
GPG key ID: 53F535A266BB9584
1576 changed files with 65385 additions and 62478 deletions

View file

@ -18,7 +18,7 @@ import { Room } from "matrix-js-sdk/src/models/room";
import { RoomMember } from "matrix-js-sdk/src/models/room-member";
import { MatrixClientPeg } from "./MatrixClientPeg";
import { _t } from './languageHandler';
import { _t } from "./languageHandler";
export function usersTypingApartFromMeAndIgnored(room: Room): RoomMember[] {
return usersTyping(room, [MatrixClientPeg.get().getUserId()].concat(MatrixClientPeg.get().getIgnoredUsers()));
@ -57,20 +57,20 @@ export function whoIsTypingString(whoIsTyping: RoomMember[], limit: number): str
}
if (whoIsTyping.length === 0) {
return '';
return "";
} else if (whoIsTyping.length === 1) {
return _t('%(displayName)s is typing …', { displayName: whoIsTyping[0].name });
return _t("%(displayName)s is typing …", { displayName: whoIsTyping[0].name });
}
const names = whoIsTyping.map(m => m.name);
const names = whoIsTyping.map((m) => m.name);
if (othersCount >= 1) {
return _t('%(names)s and %(count)s others are typing …', {
names: names.slice(0, limit - 1).join(', '),
return _t("%(names)s and %(count)s others are typing …", {
names: names.slice(0, limit - 1).join(", "),
count: othersCount,
});
} else {
const lastPerson = names.pop();
return _t('%(names)s and %(lastPerson)s are typing …', { names: names.join(', '), lastPerson: lastPerson });
return _t("%(names)s and %(lastPerson)s are typing …", { names: names.join(", "), lastPerson: lastPerson });
}
}