Make composer duck aware of the conversation it is in
This commit is contained in:
parent
7a076be0e7
commit
198d6f7e26
17 changed files with 449 additions and 170 deletions
|
@ -12,12 +12,14 @@ import { useRefMerger } from '../hooks/useRefMerger';
|
|||
import { handleOutsideClick } from '../util/handleOutsideClick';
|
||||
|
||||
export type PropsType = {
|
||||
conversationId: string;
|
||||
i18n: LocalizerType;
|
||||
isHighQuality: boolean;
|
||||
onSelectQuality: (isHQ: boolean) => unknown;
|
||||
onSelectQuality: (conversationId: string, isHQ: boolean) => unknown;
|
||||
};
|
||||
|
||||
export function MediaQualitySelector({
|
||||
conversationId,
|
||||
i18n,
|
||||
isHighQuality,
|
||||
onSelectQuality,
|
||||
|
@ -50,7 +52,7 @@ export function MediaQualitySelector({
|
|||
}
|
||||
|
||||
if (ev.key === 'Enter') {
|
||||
onSelectQuality(Boolean(focusedOption));
|
||||
onSelectQuality(conversationId, Boolean(focusedOption));
|
||||
setMenuShowing(false);
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
|
@ -136,7 +138,7 @@ export function MediaQualitySelector({
|
|||
})}
|
||||
type="button"
|
||||
onClick={() => {
|
||||
onSelectQuality(false);
|
||||
onSelectQuality(conversationId, false);
|
||||
setMenuShowing(false);
|
||||
}}
|
||||
>
|
||||
|
@ -169,7 +171,7 @@ export function MediaQualitySelector({
|
|||
})}
|
||||
type="button"
|
||||
onClick={() => {
|
||||
onSelectQuality(true);
|
||||
onSelectQuality(conversationId, true);
|
||||
setMenuShowing(false);
|
||||
}}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue