mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Use variable name instead of _
This commit is contained in:
parent
3cf8dff70d
commit
6433e163f7
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ import {Dispatcher} from "flux";
|
||||||
// Hook to simplify listening to flux dispatches
|
// Hook to simplify listening to flux dispatches
|
||||||
export const useDispatcher = (dispatcher: Dispatcher<ActionPayload>, handler: (payload: ActionPayload) => void) => {
|
export const useDispatcher = (dispatcher: Dispatcher<ActionPayload>, handler: (payload: ActionPayload) => void) => {
|
||||||
// Create a ref that stores handler
|
// Create a ref that stores handler
|
||||||
const savedHandler = useRef((_: ActionPayload) => {});
|
const savedHandler = useRef((payload: ActionPayload) => {});
|
||||||
|
|
||||||
// Update ref.current value if handler changes.
|
// Update ref.current value if handler changes.
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import { EffectiveMembership, getEffectiveMembership } from "../../../../utils/m
|
||||||
* useful to the user.
|
* useful to the user.
|
||||||
*/
|
*/
|
||||||
export class RecentAlgorithm implements IAlgorithm {
|
export class RecentAlgorithm implements IAlgorithm {
|
||||||
public async sortRooms(rooms: Room[], tagID: TagID): Promise<Room[]> {
|
public async sortRooms(rooms: Room[], tagId: TagID): Promise<Room[]> {
|
||||||
// We cache the timestamp lookup to avoid iterating forever on the timeline
|
// We cache the timestamp lookup to avoid iterating forever on the timeline
|
||||||
// of events. This cache only survives a single sort though.
|
// of events. This cache only survives a single sort though.
|
||||||
// We wouldn't need this if `.sort()` didn't constantly try and compare all
|
// We wouldn't need this if `.sort()` didn't constantly try and compare all
|
||||||
|
|
Loading…
Reference in a new issue