Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some streams disappear when clicking subspace stream #2719

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Merge branch 'dev' into CW-some-stream-disappear
MeyerPV authored Aug 26, 2024
commit 7bc09543266986ecef59d9d063e6d1c32f6ad481
Original file line number Diff line number Diff line change
@@ -346,6 +346,30 @@ function DiscussionFeedCard(props, ref) {
}
}, [item.data.lastMessage?.content]);

const lastMessage = useMemo(() => {
return getLastMessage({
commonFeedType: item.data.type,
lastMessage: item.data.lastMessage,
discussion,
currentUserId: userId,
feedItemCreatorName: getUserName(discussionCreator),
commonName,
isProject,
hasFiles: item.data.hasFiles,
hasImages: item.data.hasImages,
});
}, [
item.data.type,
item.data.lastMessage,
discussion,
userId,
discussionCreator,
commonName,
isProject,
item.data.hasFiles,
item.data.hasImages,
]);

return (
<>
<FeedCard
@@ -358,17 +382,7 @@ function DiscussionFeedCard(props, ref) {
isExpanded={isExpanded}
onClick={handleOpenChat}
title={cardTitle}
lastMessage={getLastMessage({
commonFeedType: item.data.type,
lastMessage: item.data.lastMessage,
discussion,
currentUserId: userId,
feedItemCreatorName: getUserName(discussionCreator),
commonName,
isProject,
hasFiles: item.data.hasFiles,
hasImages: item.data.hasImages,
})}
lastMessage={lastMessage}
isPreviewMode={isPreviewMode}
isPinned={isPinned}
commonName={commonName}
@@ -481,4 +495,4 @@ function DiscussionFeedCard(props, ref) {

export default forwardRef<FeedItemRef, DiscussionFeedCardProps>(
DiscussionFeedCard,
);
);
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.