From 6433e163f7ddf48b775975d6b5a7093cf9c30326 Mon Sep 17 00:00:00 2001 From: Jorik Schellekens Date: Mon, 20 Jul 2020 20:51:07 +0100 Subject: [PATCH] Use variable name instead of _ --- src/hooks/useDispatcher.ts | 2 +- src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useDispatcher.ts b/src/hooks/useDispatcher.ts index f21eb8922b..004b15fcef 100644 --- a/src/hooks/useDispatcher.ts +++ b/src/hooks/useDispatcher.ts @@ -22,7 +22,7 @@ import {Dispatcher} from "flux"; // Hook to simplify listening to flux dispatches export const useDispatcher = (dispatcher: Dispatcher, handler: (payload: ActionPayload) => void) => { // Create a ref that stores handler - const savedHandler = useRef((_: ActionPayload) => {}); + const savedHandler = useRef((payload: ActionPayload) => {}); // Update ref.current value if handler changes. useEffect(() => { diff --git a/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts b/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts index 59c04b0665..09182f3bfb 100644 --- a/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts +++ b/src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts @@ -26,7 +26,7 @@ import { EffectiveMembership, getEffectiveMembership } from "../../../../utils/m * useful to the user. */ export class RecentAlgorithm implements IAlgorithm { - public async sortRooms(rooms: Room[], tagID: TagID): Promise { + public async sortRooms(rooms: Room[], tagId: TagID): Promise { // We cache the timestamp lookup to avoid iterating forever on the timeline // of events. This cache only survives a single sort though. // We wouldn't need this if `.sort()` didn't constantly try and compare all