Skip to content

Commit 40dee7e

Browse files
committed
fix: SCG remnants from merge
1 parent e3d2bc4 commit 40dee7e

File tree

3 files changed

+13
-29
lines changed

3 files changed

+13
-29
lines changed

examples/SampleApp/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,10 +1969,10 @@
19691969
dependencies:
19701970
merge-options "^3.0.4"
19711971

1972-
"@react-native-camera-roll/camera-roll@^7.9.0":
1973-
version "7.9.0"
1974-
resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-7.9.0.tgz#7b3d199b073e9f63d49852c44456c4fa0aa27e90"
1975-
integrity sha512-Ra0lB1G2H11MzL5aIH3bwlxU1zaHGSZeRs4lBXLBO64Ai1gUgZPR7TYgKDeeRPzNPtSbZKmzs+fuZ/7XoCf1SA==
1972+
"@react-native-camera-roll/camera-roll@^7.10.0":
1973+
version "7.10.0"
1974+
resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-7.10.0.tgz#5e9518d78a9cd87ddc8e68d03e31a608df5033ab"
1975+
integrity sha512-Zm1yHxxTQS2APsnnxUFoLnK+DMMTPqmIQ2z2pGtNyHRXAG40Nt4MLVB3tDJTWnuJLAG87BpTCEvpz49+u0YkUw==
19761976

19771977
"@react-native-community/[email protected]":
19781978
version "15.1.3"

package/src/components/MessageList/MessageList.tsx

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ViewToken,
1111
} from 'react-native';
1212

13-
import type { Channel, LocalMessage } from 'stream-chat';
13+
import type { Channel, Event, LocalMessage, MessageResponse } from 'stream-chat';
1414

1515
import {
1616
isMessageWithStylesReadByAndDateSeparator,
@@ -104,19 +104,13 @@ const flatListViewabilityConfig: ViewabilityConfig = {
104104
viewAreaCoveragePercentThreshold: 1,
105105
};
106106

107-
const hasReadLastMessage = (
108-
channel: Channel,
109-
userId: string,
110-
) => {
107+
const hasReadLastMessage = (channel: Channel, userId: string) => {
111108
const latestMessageIdInChannel = channel.state.latestMessages.slice(-1)[0]?.id;
112109
const lastReadMessageIdServer = channel.state.read[userId]?.last_read_message_id;
113110
return latestMessageIdInChannel === lastReadMessageIdServer;
114111
};
115112

116-
const getPreviousLastMessage = (
117-
messages: MessageType[],
118-
newMessage?: MessageResponse,
119-
) => {
113+
const getPreviousLastMessage = (messages: MessageType[], newMessage?: MessageResponse) => {
120114
if (!newMessage) return;
121115
let previousLastMessage;
122116
for (let i = messages.length - 1; i >= 0; i--) {
@@ -526,16 +520,13 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
526520
);
527521
};
528522

529-
const handleEvent = async (event: Event<StreamChatGenerics>) => {
523+
const handleEvent = async (event: Event) => {
530524
const mainChannelUpdated = !event.message?.parent_id || event.message?.show_in_channel;
531525
// When the scrollToBottomButtonVisible is true, we need to manually update the channelUnreadState.
532526
if (scrollToBottomButtonVisible || channelUnreadState?.first_unread_message_id) {
533527
setChannelUnreadState((prev) => {
534528
const previousUnreadCount = prev?.unread_messages ?? 0;
535-
const previousLastMessage = getPreviousLastMessage<StreamChatGenerics>(
536-
channel.state.messages,
537-
event.message,
538-
);
529+
const previousLastMessage = getPreviousLastMessage(channel.state.messages, event.message);
539530
return {
540531
...(prev || {}),
541532
last_read:

package/src/components/Thread/components/ThreadFooterComponent.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,8 @@ const styles = StyleSheet.create({
4141
},
4242
});
4343

44-
type ThreadFooterComponentPropsWithContext = Pick<MessagesContextValue<StreamChatGenerics>, 'Message'> &
45-
Pick<
46-
ThreadContextValue,
47-
'parentMessagePreventPress' | 'thread' | 'threadInstance'
48-
>;
44+
type ThreadFooterComponentPropsWithContext = Pick<MessagesContextValue, 'Message'> &
45+
Pick<ThreadContextValue, 'parentMessagePreventPress' | 'thread' | 'threadInstance'>;
4946

5047
export const InlineLoadingMoreThreadIndicator = () => {
5148
const { threadLoadingMore } = useThreadContext();
@@ -71,9 +68,7 @@ const selector = (nextValue: ThreadState) =>
7168
replyCount: nextValue.replyCount,
7269
}) as const;
7370

74-
const ThreadFooterComponentWithContext = (
75-
props: ThreadFooterComponentPropsWithContext,
76-
) => {
71+
const ThreadFooterComponentWithContext = (props: ThreadFooterComponentPropsWithContext) => {
7772
const { Message, parentMessagePreventPress, thread, threadInstance } = props;
7873
const { t } = useTranslationContext();
7974
const { vw } = useViewport();
@@ -204,9 +199,7 @@ const MemoizedThreadFooter = React.memo(
204199
export type ThreadFooterComponentProps = Partial<Pick<MessagesContextValue, 'Message'>> &
205200
Partial<Pick<ThreadContextValue, 'parentMessagePreventPress' | 'thread'>>;
206201

207-
export const ThreadFooterComponent = (
208-
props: ThreadFooterComponentProps,
209-
) => {
202+
export const ThreadFooterComponent = (props: ThreadFooterComponentProps) => {
210203
const { Message } = useMessagesContext();
211204
const { parentMessagePreventPress, thread, threadInstance, threadLoadingMore } =
212205
useThreadContext();

0 commit comments

Comments
 (0)