mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
additional lint fixes
This commit is contained in:
@@ -362,7 +362,7 @@ export function Grid<
|
|||||||
// Because we're using react-spring in imperative mode, we're responsible for
|
// Because we're using react-spring in imperative mode, we're responsible for
|
||||||
// firing animations manually whenever the tiles array updates
|
// firing animations manually whenever the tiles array updates
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
springRef.start();
|
void springRef.start();
|
||||||
}, [placedTiles, springRef]);
|
}, [placedTiles, springRef]);
|
||||||
|
|
||||||
const animateDraggedTile = (
|
const animateDraggedTile = (
|
||||||
@@ -372,7 +372,7 @@ export function Grid<
|
|||||||
const { tileId, tileX, tileY } = dragState.current!;
|
const { tileId, tileX, tileY } = dragState.current!;
|
||||||
const tile = placedTiles.find((t) => t.id === tileId)!;
|
const tile = placedTiles.find((t) => t.id === tileId)!;
|
||||||
|
|
||||||
springRef.current
|
void springRef.current
|
||||||
.find((c) => (c.item as Tile<TileModel>).id === tileId)
|
.find((c) => (c.item as Tile<TileModel>).id === tileId)
|
||||||
?.start(
|
?.start(
|
||||||
endOfGesture
|
endOfGesture
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ describe("CallList", () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
it("should show room", async () => {
|
it("should show room", () => {
|
||||||
const rooms = [
|
const rooms = [
|
||||||
{
|
{
|
||||||
roomName: "Room #1",
|
roomName: "Room #1",
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import {
|
|||||||
useMemo,
|
useMemo,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { IWidgetApiRequest } from "matrix-widget-api";
|
import { IWidgetApiRequest } from "matrix-widget-api";
|
||||||
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { MediaDevice, useMediaDevices } from "../livekit/MediaDevicesContext";
|
import { MediaDevice, useMediaDevices } from "../livekit/MediaDevicesContext";
|
||||||
import { useReactiveState } from "../useReactiveState";
|
import { useReactiveState } from "../useReactiveState";
|
||||||
@@ -83,10 +84,14 @@ export function useMuteStates(): MuteStates {
|
|||||||
const video = useMuteState(devices.videoInput, () => true);
|
const video = useMuteState(devices.videoInput, () => true);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
widget?.api.transport.send(ElementWidgetActions.DeviceMute, {
|
widget?.api.transport
|
||||||
audio_enabled: audio.enabled,
|
.send(ElementWidgetActions.DeviceMute, {
|
||||||
video_enabled: video.enabled,
|
audio_enabled: audio.enabled,
|
||||||
});
|
video_enabled: video.enabled,
|
||||||
|
})
|
||||||
|
.catch((e) =>
|
||||||
|
logger.warn("Could not send DeviceMute action to widget", e),
|
||||||
|
);
|
||||||
}, [audio, video]);
|
}, [audio, video]);
|
||||||
|
|
||||||
const onMuteStateChangeRequest = useCallback(
|
const onMuteStateChangeRequest = useCallback(
|
||||||
|
|||||||
@@ -20,17 +20,21 @@ import posthog from "posthog-js";
|
|||||||
import { initReactI18next } from "react-i18next";
|
import { initReactI18next } from "react-i18next";
|
||||||
import { afterEach, beforeEach } from "vitest";
|
import { afterEach, beforeEach } from "vitest";
|
||||||
import { cleanup } from "@testing-library/react";
|
import { cleanup } from "@testing-library/react";
|
||||||
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
import { Config } from "./config/Config";
|
import { Config } from "./config/Config";
|
||||||
|
|
||||||
// Bare-minimum i18n config
|
// Bare-minimum i18n config
|
||||||
i18n.use(initReactI18next).init({
|
i18n
|
||||||
lng: "en-GB",
|
.use(initReactI18next)
|
||||||
fallbackLng: "en-GB",
|
.init({
|
||||||
interpolation: {
|
lng: "en-GB",
|
||||||
escapeValue: false, // React has built-in XSS protections
|
fallbackLng: "en-GB",
|
||||||
},
|
interpolation: {
|
||||||
});
|
escapeValue: false, // React has built-in XSS protections
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.catch((e) => logger.warn("Failed to init i18n for testing", e));
|
||||||
|
|
||||||
Config.initDefault();
|
Config.initDefault();
|
||||||
posthog.opt_out_capturing();
|
posthog.opt_out_capturing();
|
||||||
|
|||||||
Reference in New Issue
Block a user