Skip to content

Commit e505842

Browse files
authored
Merge pull request #2971 from GetStream/develop
Next Release
2 parents d947ffa + 094a0e1 commit e505842

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

Diff for: package/src/components/MessageInput/FileUploadPreview.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const FileUploadPreviewWithContext = <
161161
})),
162162
);
163163
// eslint-disable-next-line react-hooks/exhaustive-deps
164-
}, [fileUploads.length]);
164+
}, [fileUploads]);
165165

166166
// Handler triggered when an audio is loaded in the message input. The initial state is defined for the audio here and the duration is set.
167167
const onLoad = (index: string, duration: number) => {

Diff for: package/src/components/MessageMenu/MessageMenu.tsx

+15-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
MessagesContextValue,
1313
useMessagesContext,
1414
} from '../../contexts/messagesContext/MessagesContext';
15+
import { useTheme } from '../../contexts/themeContext/ThemeContext';
1516
import { DefaultStreamChatGenerics } from '../../types/types';
1617
import { BottomSheetModal } from '../UIComponents/BottomSheetModal';
1718

@@ -96,10 +97,23 @@ export const MessageMenu = <
9697
propMessageUserReactionsAvatar ?? contextMessageUserReactionsAvatar;
9798
const MessageUserReactionsItem = propMessageUserReactionsItem ?? contextMessageUserReactionsItem;
9899
const message = propMessage ?? contextMessage;
100+
const {
101+
theme: {
102+
messageMenu: {
103+
bottomSheet: { height: bottomSheetHeight },
104+
},
105+
},
106+
} = useTheme();
99107

100108
return (
101109
<BottomSheetModal
102-
height={messageActions.length === 0 && !showMessageReactions ? height / 5 : height / 2}
110+
height={
111+
bottomSheetHeight
112+
? bottomSheetHeight
113+
: messageActions.length === 0 && !showMessageReactions
114+
? height / 5
115+
: height / 2
116+
}
103117
onClose={dismissOverlay}
104118
visible={visible}
105119
>

Diff for: package/src/contexts/themeContext/utils/theme.ts

+4
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,9 @@ export type Theme = {
450450
icon: ViewStyle;
451451
title: TextStyle;
452452
};
453+
bottomSheet: {
454+
height?: number;
455+
};
453456
reactionButton: {
454457
filledColor: ColorValue;
455458
unfilledColor: ColorValue;
@@ -1207,6 +1210,7 @@ export const defaultTheme: Theme = {
12071210
icon: {},
12081211
title: {},
12091212
},
1213+
bottomSheet: {},
12101214
reactionButton: {
12111215
filledColor: Colors.accent_blue,
12121216
unfilledColor: Colors.grey,

0 commit comments

Comments
 (0)