Fix the single-violation style findings. [skip build]
This commit is contained in:
@@ -92,13 +92,15 @@ export function useTypingVerbs(userIds: string[]): Record<string, string | undef
|
||||
let cancelled = false;
|
||||
const unsubscribe = registerProfileCacheListener(() => setTick((tick) => tick + 1));
|
||||
|
||||
// setProfileCache does not notify listeners, so a fresh fetch has to re-render here
|
||||
const rerender = () => {
|
||||
if (!cancelled) setTick((tick) => tick + 1);
|
||||
};
|
||||
|
||||
for (const userId of key.split(',')) {
|
||||
if (getCachedProfileFields(userId)) continue;
|
||||
// setProfileCache does not notify listeners, so a fresh fetch has to re-render here
|
||||
getProfileFields(mx, userId)
|
||||
.then(() => {
|
||||
if (!cancelled) setTick((tick) => tick + 1);
|
||||
})
|
||||
.then(rerender)
|
||||
.catch(() => undefined);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user