Skip to content

Commit 21d5bbc

Browse files
authored
Merge pull request #2764 from GetStream/develop
Next Release
2 parents 5052d03 + 5258a18 commit 21d5bbc

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ export const useLatestMessagePreview = <
298298

299299
useEffect(() => {
300300
if (channelConfigExists) {
301-
const read_events = channel.getConfig()?.read_events;
301+
const read_events =
302+
!channel.disconnected && !!channel?.id && channel.getConfig()?.read_events;
302303
if (typeof read_events === 'boolean') {
303304
setReadEvents(read_events);
304305
}

package/src/components/MessageInput/MessageInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ export const MessageInput = <
11651165
* Disable the message input if the channel is frozen, or the user doesn't have the capability to send a message.
11661166
* Enable it in frozen mode, if it the input has editing state.
11671167
*/
1168-
if (!editing && disabled && !ownCapabilities.sendMessage && SendMessageDisallowedIndicator) {
1168+
if ((disabled || !ownCapabilities.sendMessage) && !editing && SendMessageDisallowedIndicator) {
11691169
return <SendMessageDisallowedIndicator />;
11701170
}
11711171

package/src/components/MessageInput/components/NativeAttachmentPicker.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,17 @@ export const NativeAttachmentPicker = ({
120120

121121
// do not allow poll creation in threads
122122
const buttons =
123-
threadList && hasCreatePoll && ownCapabilities.sendPoll
124-
? []
125-
: [
123+
!threadList && hasCreatePoll && ownCapabilities.sendPoll
124+
? [
126125
{
127126
icon: <CreatePollIcon />,
128127
id: 'Poll',
129128
onPressHandler: () => {
130129
openPollCreationDialog?.({ sendMessage });
131130
},
132131
},
133-
];
132+
]
133+
: [];
134134

135135
if (hasImagePicker) {
136136
buttons.push({

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ exports[`Thread should match thread snapshot 1`] = `
416416
"overflow": "hidden",
417417
},
418418
{
419-
"backgroundColor": "#FFFFFF",
419+
"backgroundColor": "#F2F2F2",
420420
"borderBottomLeftRadius": 0,
421421
"borderBottomRightRadius": 16,
422422
"borderColor": "#ECEBEB",
@@ -742,7 +742,7 @@ exports[`Thread should match thread snapshot 1`] = `
742742
"overflow": "hidden",
743743
},
744744
{
745-
"backgroundColor": "#FFFFFF",
745+
"backgroundColor": "#F2F2F2",
746746
"borderBottomLeftRadius": 0,
747747
"borderBottomRightRadius": 16,
748748
"borderColor": "#ECEBEB",
@@ -1068,7 +1068,7 @@ exports[`Thread should match thread snapshot 1`] = `
10681068
"overflow": "hidden",
10691069
},
10701070
{
1071-
"backgroundColor": "#FFFFFF",
1071+
"backgroundColor": "#F2F2F2",
10721072
"borderBottomLeftRadius": 0,
10731073
"borderBottomRightRadius": 16,
10741074
"borderColor": "#ECEBEB",
@@ -1422,7 +1422,7 @@ exports[`Thread should match thread snapshot 1`] = `
14221422
"overflow": "hidden",
14231423
},
14241424
{
1425-
"backgroundColor": "#FFFFFF",
1425+
"backgroundColor": "#F2F2F2",
14261426
"borderBottomLeftRadius": 0,
14271427
"borderBottomRightRadius": 16,
14281428
"borderColor": "#ECEBEB",

package/src/contexts/themeContext/utils/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ export const defaultTheme: Theme = {
12181218
metaText: {
12191219
fontSize: 12,
12201220
},
1221-
receiverMessageBackgroundColor: Colors.white,
1221+
receiverMessageBackgroundColor: Colors.white_smoke,
12221222
replyBorder: {},
12231223
replyContainer: {},
12241224
senderMessageBackgroundColor: Colors.grey_gainsboro,

0 commit comments

Comments
 (0)