Skip to content

Commit 3eb3bef

Browse files
authored
Merge pull request #3314 from GetStream/develop
Next Release
2 parents d4d8f75 + cfee649 commit 3eb3bef

File tree

7 files changed

+46
-96
lines changed

7 files changed

+46
-96
lines changed

package/src/components/AttachmentPicker/AttachmentPicker.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,11 @@ export const AttachmentPicker = React.forwardRef(
278278
>
279279
{iOSLimited && <AttachmentPickerIOSSelectMorePhotos />}
280280
<BottomSheetFlatList
281-
contentContainerStyle={[
281+
contentContainerStyle={StyleSheet.flatten([
282282
styles.container,
283-
{ backgroundColor: white },
283+
{ backgroundColor: white, opacity: photoError ? 0 : 1 },
284284
bottomSheetContentContainer,
285-
{ opacity: photoError ? 0 : 1 },
286-
]}
285+
])}
287286
data={selectedPhotos}
288287
keyExtractor={(item) => item.asset.uri}
289288
numColumns={numberOfAttachmentPickerImageColumns ?? 3}

package/src/components/Channel/Channel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ export type ChannelPropsWithContext = Pick<ChannelContextValue, 'channel'> &
445445
localMessage: LocalMessage;
446446
message: StreamMessage;
447447
options?: SendMessageOptions;
448-
}) => Promise<SendMessageAPIResponse>;
448+
}) => Promise<void>;
449449
/**
450450
* Overrides the Stream default update message request (Advanced usage only)
451451
* @param channelId

package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageStatus.test.js.snap

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,11 @@ exports[`MessageStatus should render message status with read by container 1`] =
137137
>
138138
<RCTScrollView
139139
contentContainerStyle={
140-
[
141-
{
142-
"flexGrow": 1,
143-
},
144-
{
145-
"backgroundColor": "#FFFFFF",
146-
},
147-
{},
148-
{
149-
"opacity": 1,
150-
},
151-
]
140+
{
141+
"backgroundColor": "#FFFFFF",
142+
"flexGrow": 1,
143+
"opacity": 1,
144+
}
152145
}
153146
data={[]}
154147
getItem={[Function]}

package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`AttachButton should call handleAttachButtonPress when the button is clicked if passed 1`] = `
44
<View
@@ -172,18 +172,11 @@ exports[`AttachButton should call handleAttachButtonPress when the button is cli
172172
>
173173
<RCTScrollView
174174
contentContainerStyle={
175-
[
176-
{
177-
"flexGrow": 1,
178-
},
179-
{
180-
"backgroundColor": "#FFFFFF",
181-
},
182-
{},
183-
{
184-
"opacity": 1,
185-
},
186-
]
175+
{
176+
"backgroundColor": "#FFFFFF",
177+
"flexGrow": 1,
178+
"opacity": 1,
179+
}
187180
}
188181
data={[]}
189182
getItem={[Function]}
@@ -382,18 +375,11 @@ exports[`AttachButton should render a enabled AttachButton 1`] = `
382375
>
383376
<RCTScrollView
384377
contentContainerStyle={
385-
[
386-
{
387-
"flexGrow": 1,
388-
},
389-
{
390-
"backgroundColor": "#FFFFFF",
391-
},
392-
{},
393-
{
394-
"opacity": 1,
395-
},
396-
]
378+
{
379+
"backgroundColor": "#FFFFFF",
380+
"flexGrow": 1,
381+
"opacity": 1,
382+
}
397383
}
398384
data={[]}
399385
getItem={[Function]}
@@ -592,18 +578,11 @@ exports[`AttachButton should render an disabled AttachButton 1`] = `
592578
>
593579
<RCTScrollView
594580
contentContainerStyle={
595-
[
596-
{
597-
"flexGrow": 1,
598-
},
599-
{
600-
"backgroundColor": "#FFFFFF",
601-
},
602-
{},
603-
{
604-
"opacity": 1,
605-
},
606-
]
581+
{
582+
"backgroundColor": "#FFFFFF",
583+
"flexGrow": 1,
584+
"opacity": 1,
585+
}
607586
}
608587
data={[]}
609588
getItem={[Function]}

package/src/components/MessageInput/__tests__/__snapshots__/SendButton.test.js.snap

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`SendButton should render a SendButton 1`] = `
44
<View
@@ -147,18 +147,11 @@ exports[`SendButton should render a SendButton 1`] = `
147147
>
148148
<RCTScrollView
149149
contentContainerStyle={
150-
[
151-
{
152-
"flexGrow": 1,
153-
},
154-
{
155-
"backgroundColor": "#FFFFFF",
156-
},
157-
{},
158-
{
159-
"opacity": 1,
160-
},
161-
]
150+
{
151+
"backgroundColor": "#FFFFFF",
152+
"flexGrow": 1,
153+
"opacity": 1,
154+
}
162155
}
163156
data={[]}
164157
getItem={[Function]}
@@ -332,18 +325,11 @@ exports[`SendButton should render a disabled SendButton 1`] = `
332325
>
333326
<RCTScrollView
334327
contentContainerStyle={
335-
[
336-
{
337-
"flexGrow": 1,
338-
},
339-
{
340-
"backgroundColor": "#FFFFFF",
341-
},
342-
{},
343-
{
344-
"opacity": 1,
345-
},
346-
]
328+
{
329+
"backgroundColor": "#FFFFFF",
330+
"flexGrow": 1,
331+
"opacity": 1,
332+
}
347333
}
348334
data={[]}
349335
getItem={[Function]}

package/src/components/Poll/components/PollOption.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,24 +181,24 @@ export const VoteButton = ({ onPress, option }: PollVoteButtonProps) => {
181181
toggleVote();
182182
}, [message, onPress, poll, toggleVote]);
183183

184+
const hasVote = !!ownVotesByOptionId[option.id];
185+
184186
return ownCapabilities.castPollVote && !isClosed ? (
185187
<Pressable
186188
onPress={onPressHandler}
187189
style={({ pressed }) => [
188190
{ opacity: pressed ? 0.5 : 1 },
189191
styles.voteContainer,
190192
{
191-
backgroundColor: ownVotesByOptionId[option.id]
192-
? voteButtonActive || accent_dark_blue
193-
: 'transparent',
194-
borderColor: ownVotesByOptionId[option.id]
193+
backgroundColor: hasVote ? voteButtonActive || accent_dark_blue : 'transparent',
194+
borderColor: hasVote
195195
? voteButtonActive || accent_dark_blue
196196
: voteButtonInactive || disabled,
197197
},
198198
voteButtonContainer,
199199
]}
200200
>
201-
{ownVotesByOptionId[option.id] ? <Check height={15} pathFill='white' width={20} /> : null}
201+
{hasVote ? <Check height={15} pathFill='white' width={20} /> : null}
202202
</Pressable>
203203
) : null;
204204
};

package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,18 +2439,11 @@ exports[`Thread should match thread snapshot 1`] = `
24392439
>
24402440
<RCTScrollView
24412441
contentContainerStyle={
2442-
[
2443-
{
2444-
"flexGrow": 1,
2445-
},
2446-
{
2447-
"backgroundColor": "#FFFFFF",
2448-
},
2449-
{},
2450-
{
2451-
"opacity": 1,
2452-
},
2453-
]
2442+
{
2443+
"backgroundColor": "#FFFFFF",
2444+
"flexGrow": 1,
2445+
"opacity": 1,
2446+
}
24542447
}
24552448
data={[]}
24562449
getItem={[Function]}

0 commit comments

Comments
 (0)