Skip to content

Commit 4ec4985

Browse files
committed
Merge branch 'v6.0.0' of github.com:GetStream/stream-chat-react-native into mark-as-unread
2 parents f8d0af5 + abbcdf8 commit 4ec4985

File tree

19 files changed

+560
-539
lines changed

19 files changed

+560
-539
lines changed

examples/ExpoMessaging/app.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,6 @@
4747
{
4848
"microphonePermission": "$(PRODUCT_NAME) would like to use your microphone for voice recording."
4949
}
50-
],
51-
[
52-
"expo-build-properties",
53-
{
54-
"android": {
55-
"newArchEnabled": true
56-
},
57-
"ios": {
58-
"newArchEnabled": true
59-
}
60-
}
6150
]
6251
]
6352
}

package/src/components/Attachment/Gallery.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ const GalleryImageThumbnail = <
458458
setLoadingImage(false);
459459
setLoadingImageError(true);
460460
}}
461-
onLoadEnd={() => setLoadingImage(false)}
461+
onLoadEnd={() => setTimeout(() => setLoadingImage(false), 0)}
462462
onLoadStart={() => setLoadingImage(true)}
463463
resizeMode={thumbnail.resizeMode}
464464
style={[

package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ const AttachmentImage = (props: AttachmentImageProps) => {
170170
}
171171
};
172172

173-
console.log('URIS: IMG: ', uri, originalUri);
174-
175173
return (
176174
<TouchableOpacity onPress={onPressImage}>
177175
<ImageBackground

package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import React from 'react';
22
import { StyleSheet, TouchableOpacity, View } from 'react-native';
33

4-
import {
5-
useChannelContext,
6-
useMessagesContext,
7-
useOwnCapabilitiesContext,
8-
} from '../../../contexts';
94
import { useAttachmentPickerContext } from '../../../contexts/attachmentPickerContext/AttachmentPickerContext';
5+
import { useChannelContext } from '../../../contexts/channelContext/ChannelContext';
106
import { useMessageInputContext } from '../../../contexts/messageInputContext/MessageInputContext';
7+
import { useMessagesContext } from '../../../contexts/messagesContext/MessagesContext';
8+
import { useOwnCapabilitiesContext } from '../../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
119
import { useTheme } from '../../../contexts/themeContext/ThemeContext';
1210

1311
const styles = StyleSheet.create({

package/src/components/ImageGallery/hooks/useAnimatedGalleryStyle.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ export const useAnimatedGalleryStyle = ({
7272
{ scaleX: -1 },
7373
{ translateY: yScaleOffset },
7474
{
75-
translateX: -translateX.value - xScaleOffset,
75+
translateX: -xScaleOffset,
7676
},
7777
{ scale: oneEighth },
7878
],
7979
};
80-
}, []);
80+
}, [index]);
8181

8282
return [animatedGalleryStyle, animatedStyles];
8383
};

package/src/components/Poll/CreatePollContent.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useCallback, useEffect, useState } from 'react';
2-
import { StyleSheet, Switch, Text, TextInput, TouchableOpacity, View } from 'react-native';
2+
import { Pressable, StyleSheet, Switch, Text, TextInput, View } from 'react-native';
33

44
import { ScrollView } from 'react-native-gesture-handler';
55
import { useSharedValue } from 'react-native-reanimated';
@@ -94,7 +94,7 @@ export const CreatePollContent = () => {
9494
<>
9595
<View style={[styles.headerContainer, { backgroundColor: white }, headerContainer]}>
9696
<PollModalHeader onPress={() => closePollCreationDialog?.()} title={t('Create Poll')} />
97-
<TouchableOpacity
97+
<Pressable
9898
disabled={!isPollValid}
9999
onPress={() => {
100100
const currentPollOptions = Object.assign({}, pollOptions);
@@ -120,15 +120,15 @@ export const CreatePollContent = () => {
120120
: {}),
121121
});
122122
}}
123-
style={[styles.sendButton, sendButton]}
123+
style={({ pressed }) => [{ opacity: pressed ? 0.5 : 1 }, styles.sendButton, sendButton]}
124124
>
125125
<SendPoll
126126
height={24}
127127
pathFill={isPollValid ? '#005DFF' : '#B4BBBA'}
128128
viewBox='0 0 24 24'
129129
width={24}
130130
/>
131-
</TouchableOpacity>
131+
</Pressable>
132132
</View>
133133
<ScrollView
134134
contentContainerStyle={{ paddingBottom: 70 }}

package/src/components/Poll/Poll.tsx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@ import { StyleSheet, Text, View } from 'react-native';
33

44
import { PollOption as PollOptionClass } from 'stream-chat';
55

6-
import {
7-
AddCommentButton,
8-
EndVoteButton,
9-
PollOption,
10-
ShowAllCommentsButton,
11-
ShowAllOptionsButton,
12-
SuggestOptionButton,
13-
ViewResultsButton,
14-
} from './components';
6+
import { PollButtons, PollOption } from './components';
157

168
import { usePollState } from './hooks/usePollState';
179

@@ -34,17 +26,6 @@ export type PollContentProps = {
3426
PollHeader?: React.ComponentType;
3527
};
3628

37-
export const PollButtons = () => (
38-
<>
39-
<ShowAllOptionsButton />
40-
<ShowAllCommentsButton />
41-
<SuggestOptionButton />
42-
<AddCommentButton />
43-
<ViewResultsButton />
44-
<EndVoteButton />
45-
</>
46-
);
47-
4829
export const PollHeader = () => {
4930
const { t } = useTranslationContext();
5031
const { enforceUniqueVote, isClosed, maxVotesAllowed, name } = usePollState();

0 commit comments

Comments
 (0)