mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-28 06:50:26 +00:00
linting
This commit is contained in:
@@ -24,14 +24,14 @@ import {
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import classNames from "classnames";
|
||||
import { useObservableState } from "observable-hooks";
|
||||
import { map } from "rxjs";
|
||||
|
||||
import { useReactions } from "../useReactions";
|
||||
import styles from "./ReactionToggleButton.module.css";
|
||||
import { ReactionOption, ReactionSet, ReactionsRowSize } from "../reactions";
|
||||
import { Modal } from "../Modal";
|
||||
import { CallViewModel } from "../state/CallViewModel";
|
||||
import { useObservableState } from "observable-hooks";
|
||||
import { map } from "rxjs";
|
||||
|
||||
interface InnerButtonProps extends ComponentPropsWithoutRef<"button"> {
|
||||
raised: boolean;
|
||||
|
||||
@@ -6,9 +6,10 @@ Please see LICENSE in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { ReactNode } from "react";
|
||||
import { useObservableState } from "observable-hooks";
|
||||
|
||||
import styles from "./ReactionsOverlay.module.css";
|
||||
import { CallViewModel } from "../state/CallViewModel";
|
||||
import { useObservableState } from "observable-hooks";
|
||||
|
||||
export function ReactionsOverlay({ vm }: { vm: CallViewModel }): ReactNode {
|
||||
const reactionsIcons = useObservableState(vm.visibleReactions);
|
||||
|
||||
@@ -1117,12 +1117,17 @@ export class CallViewModel extends ViewModel {
|
||||
this.scope.state(),
|
||||
);
|
||||
|
||||
public readonly handsRaised = new Subject<Record<string, Date>>();
|
||||
public readonly reactions = new Subject<Record<string, ReactionOption>>();
|
||||
private readonly handsRaisedSubject = new Subject<Record<string, Date>>();
|
||||
private readonly reactionsSubject = new Subject<
|
||||
Record<string, ReactionOption>
|
||||
>();
|
||||
|
||||
public updateReactions(data: ReturnType<typeof useReactions>) {
|
||||
this.handsRaised.next(data.raisedHands);
|
||||
this.reactions.next(data.reactions);
|
||||
public readonly handRaised = this.handsRaisedSubject.asObservable();
|
||||
public readonly reactions = this.reactionsSubject.asObservable();
|
||||
|
||||
public updateReactions(data: ReturnType<typeof useReactions>): void {
|
||||
this.handsRaisedSubject.next(data.raisedHands);
|
||||
this.reactionsSubject.next(data.reactions);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -108,7 +108,7 @@ export const ReactionsProvider = ({
|
||||
memberships.find(
|
||||
(m) => m.sender === myUserId && m.deviceId === myDeviceId,
|
||||
)?.eventId,
|
||||
[memberships, myUserId],
|
||||
[memberships, myUserId, myDeviceId],
|
||||
);
|
||||
const myMembershipIdentifier = useMemo(() => {
|
||||
const membership = memberships.find((m) => m.sender === myUserId);
|
||||
|
||||
Reference in New Issue
Block a user