Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
752e243
fix: add RAF coalescing
isekovanic Oct 1, 2025
db6bceb
fix: correct import
isekovanic Oct 2, 2025
36f28a8
fix: livestreaming mode MVCP
isekovanic Oct 3, 2025
21eab51
perf: throttle certain channel preview updates to avoid stressing the…
isekovanic Oct 3, 2025
1463368
fix: goToMessage behaviour
isekovanic Oct 3, 2025
8b6aefc
feat: add message pruning capabilities
isekovanic Oct 9, 2025
775d07c
perf: only register animated values when STR is enabled
isekovanic Oct 9, 2025
1fffddb
chore: extract message bubble
isekovanic Oct 9, 2025
54104d3
chore: add menu option
isekovanic Oct 9, 2025
358a8e0
chore: add menu option for pruning a well
isekovanic Oct 9, 2025
ef75748
fix: variable dynamic size message items
isekovanic Oct 10, 2025
ddc38aa
fix: flashlist mvcp disjoint set bug
isekovanic Oct 10, 2025
0c37e4c
fix: memoize message bubble components to be in line with previous be…
isekovanic Oct 10, 2025
38ca199
fix: save a render cycle through restructuring
isekovanic Oct 10, 2025
8dd98f7
fix: remove redundant check
isekovanic Oct 10, 2025
84cfe17
Revert "fix: remove redundant check"
isekovanic Oct 10, 2025
fe0a416
Revert "fix: save a render cycle through restructuring"
isekovanic Oct 10, 2025
40d3260
fix: experiment with scrollToIndex
isekovanic Oct 10, 2025
f2d4c70
fix: styles since upgrade
isekovanic Oct 10, 2025
3d12757
fix: scroll to bottom not always working
isekovanic Oct 10, 2025
1937fec
fix: api rename
isekovanic Oct 10, 2025
17c8693
chore: flashlist bump
isekovanic Oct 10, 2025
40ddb8c
fix: stutter when scrolling to message
isekovanic Oct 15, 2025
cc3c302
fix: infinite scroll bug
isekovanic Oct 15, 2025
0825ade
chore: bump stream-chat-js
isekovanic Oct 15, 2025
88a2bd1
chore: add package.json as well
isekovanic Oct 15, 2025
be7b6a4
Merge branch 'develop' into perf/livestreaming-improvements
isekovanic Oct 15, 2025
07a7c77
fix: remove console.log
isekovanic Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 44 additions & 9 deletions examples/SampleApp/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ import type { LocalMessage, StreamChat, TextComposerMiddleware } from 'stream-ch
import { Toast } from './src/components/ToastComponent/Toast';
import { useClientNotificationsToastHandler } from './src/hooks/useClientNotificationsToastHandler';
import AsyncStore from './src/utils/AsyncStore.ts';
import {
MessageListImplementationConfigItem,
MessageListModeConfigItem,
MessageListPruningConfigItem,
} from './src/components/SecretMenu.tsx';

init({ data });

Expand Down Expand Up @@ -91,7 +96,15 @@ const Stack = createStackNavigator<StackNavigatorParamList>();
const UserSelectorStack = createStackNavigator<UserSelectorParamList>();
const App = () => {
const { chatClient, isConnecting, loginUser, logout, switchUser } = useChatClient();
const [messageListImplementation, setMessageListImplementation] = useState<'flashlist' | 'flatlist' | null>(null);
const [messageListImplementation, setMessageListImplementation] = useState<
MessageListImplementationConfigItem['id'] | undefined
>(undefined);
const [messageListMode, setMessageListMode] = useState<
MessageListModeConfigItem['mode'] | undefined
>(undefined);
const [messageListPruning, setMessageListPruning] = useState<
MessageListPruningConfigItem['value'] | undefined
>(undefined);
const colorScheme = useColorScheme();
const streamChatTheme = useStreamChatTheme();

Expand Down Expand Up @@ -133,14 +146,26 @@ const App = () => {
}
}
});
const getMessageListImplementation = async () => {
const storedValue = await AsyncStore.getItem(
const getMessageListConfig = async () => {
const messageListImplementationStoredValue = await AsyncStore.getItem(
'@stream-rn-sampleapp-messagelist-implementation',
{ id: 'flashlist' }
{ id: 'flatlist' },
);
setMessageListImplementation(storedValue?.id as ('flashlist' | 'flatlist'));
}
getMessageListImplementation();
const messageListModeStoredValue = await AsyncStore.getItem(
'@stream-rn-sampleapp-messagelist-mode',
{ mode: 'default' },
);
const messageListPruningStoredValue = await AsyncStore.getItem(
'@stream-rn-sampleapp-messagelist-pruning',
{ value: undefined },
);
setMessageListImplementation(
messageListImplementationStoredValue?.id as MessageListImplementationConfigItem['id'],
);
setMessageListMode(messageListModeStoredValue?.mode as MessageListModeConfigItem['mode']);
setMessageListPruning(messageListPruningStoredValue?.value as MessageListPruningConfigItem['value']);
};
getMessageListConfig();
return () => {
unsubscribeOnNotificationOpen();
unsubscribeForegroundEvent();
Expand Down Expand Up @@ -172,7 +197,7 @@ const App = () => {
});
}, [chatClient]);

if (!messageListImplementation) {
if (!messageListImplementation || !messageListMode) {
return;
}

Expand All @@ -194,7 +219,17 @@ const App = () => {
dark: colorScheme === 'dark',
}}
>
<AppContext.Provider value={{ chatClient, loginUser, logout, switchUser, messageListImplementation }}>
<AppContext.Provider
value={{
chatClient,
loginUser,
logout,
switchUser,
messageListImplementation,
messageListMode,
messageListPruning,
}}
>
{isConnecting && !chatClient ? (
<LoadingScreen />
) : chatClient ? (
Expand Down
2 changes: 1 addition & 1 deletion examples/SampleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@react-navigation/drawer": "7.4.1",
"@react-navigation/native": "^7.1.10",
"@react-navigation/stack": "^7.3.3",
"@shopify/flash-list": "^2.0.3",
"@shopify/flash-list": "^2.1.0",
"emoji-mart": "^5.6.0",
"lodash.mergewith": "^4.6.2",
"react": "19.1.0",
Expand Down
Loading
Loading