Skip to content

Commit 87ef3b3

Browse files
authored
[CLNP-4556]Fixed a bug where 0 is displayed under the message when adding and then deleting Ripple in a thread (#1348)
[fix]: Fixed an issue where `0` was displayed when a reply was added and then deleted. Fixes [CLNP-4556](https://sendbird.atlassian.net/browse/CLNP-4556) ### Changelogs - Fixed a bug where `0` was displayed when a reply was added and then deleted ### Checklist Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If unsure, ask the members. This is a reminder of what we look for before merging your code. - [x] **All tests pass locally with my changes** - [ ] **I have added tests that prove my fix is effective or that my feature works** - [ ] **Public components / utils / props are appropriately exported** - [ ] I have added necessary documentation (if appropriate) ## External Contributions This project is not yet set up to accept pull requests from external contributors. If you have a pull request that you believe should be accepted, please contact the Developer Relations team <[email protected]> with details and we'll evaluate if we can set up a [CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement) to allow for the contribution. [CLNP-4556]: https://sendbird.atlassian.net/browse/CLNP-4556?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 805fb4a commit 87ef3b3

File tree

5 files changed

+28
-26
lines changed

5 files changed

+28
-26
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@
7070
"react-dom": "^16.8.6 || ^17.0.0 || ^18.0.0 || ^19.0.0"
7171
},
7272
"dependencies": {
73-
"@sendbird/chat": "^4.19.1",
74-
"@sendbird/react-uikit-message-template-view": "^0.0.8",
75-
"@sendbird/uikit-tools": "^0.0.8",
73+
"@sendbird/chat": "^4.19.2",
74+
"@sendbird/react-uikit-message-template-view": "^0.0.10",
75+
"@sendbird/uikit-tools": "^0.0.10",
7676
"css-vars-ponyfill": "^2.3.2",
7777
"date-fns": "^2.16.1",
7878
"dompurify": "^3.2.4"

src/ui/MessageContent/__tests__/__snapshots__/MessageContent.spec.js.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ exports[`ui/MessageContent should do a snapshot test of the MessageContent DOM 1
6666
mock-date
6767
</span>
6868
</div>
69-
0
7069
</div>
7170
<div
7271
class="sendbird-message-content__right"

src/ui/MessageContent/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function MessageContent(props: MessageContentProps): ReactElement {
182182
}, [useReplying]);
183183

184184
// Thread replies
185-
const displayThreadReplies = message?.threadInfo?.replyCount
185+
const displayThreadReplies = message?.threadInfo
186186
&& message.threadInfo.replyCount > 0
187187
&& replyType === 'THREAD';
188188

src/ui/ThreadReplies/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export function ThreadReplies(
2525
mostRepliedUsers = [],
2626
replyCount,
2727
} = threadInfo;
28+
2829
const { stringSet } = useLocalization();
2930
return (
3031
<div
@@ -74,7 +75,8 @@ export function ThreadReplies(
7475
</div>
7576
)}
7677
</div>
77-
<Label
78+
{replyCount > 0 && (
79+
<Label
7880
className="sendbird-ui-thread-replies__reply-counts"
7981
type={LabelTypography.CAPTION_2}
8082
color={LabelColors.PRIMARY}
@@ -85,6 +87,7 @@ export function ThreadReplies(
8587
: `${replyCount > 99 ? stringSet.CHANNEL__THREAD_OVER_MAX : replyCount} ${stringSet.CHANNEL__THREAD_REPLIES}`
8688
}
8789
</Label>
90+
)}
8891
<Icon
8992
className="sendbird-ui-thread-replies__icon"
9093
type={IconTypes.CHEVRON_RIGHT}

yarn.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2747,9 +2747,9 @@ __metadata:
27472747
languageName: node
27482748
linkType: hard
27492749

2750-
"@sendbird/chat@npm:^4.19.1":
2751-
version: 4.19.1
2752-
resolution: "@sendbird/chat@npm:4.19.1"
2750+
"@sendbird/chat@npm:^4.19.2":
2751+
version: 4.19.2
2752+
resolution: "@sendbird/chat@npm:4.19.2"
27532753
peerDependencies:
27542754
"@react-native-async-storage/async-storage": ^1.17.6
27552755
react-native-mmkv: ">=2.0.0"
@@ -2758,29 +2758,29 @@ __metadata:
27582758
optional: true
27592759
react-native-mmkv:
27602760
optional: true
2761-
checksum: d500cbd6d994dbfdc8754814b61e8011c2aceb0c5c2a19780fdb9692cdd91a83a750c59aa4dc605c563394abed8242a0a589aa726ed097f2e49e3b7ddef59a65
2761+
checksum: 6cb69158f19633252f474c6edd1ae1e55d1d46dc1dcf628a0a5c5108ee1b9cafd5a2cde63aeb011237d9fdc5789c8388209ced2fc97b0d9841d5c5aa2bb6d9da
27622762
languageName: node
27632763
linkType: hard
27642764

2765-
"@sendbird/react-uikit-message-template-view@npm:^0.0.8":
2766-
version: 0.0.8
2767-
resolution: "@sendbird/react-uikit-message-template-view@npm:0.0.8"
2765+
"@sendbird/react-uikit-message-template-view@npm:^0.0.10":
2766+
version: 0.0.10
2767+
resolution: "@sendbird/react-uikit-message-template-view@npm:0.0.10"
27682768
dependencies:
2769-
"@sendbird/uikit-message-template": ^0.0.8
2769+
"@sendbird/uikit-message-template": ^0.0.10
27702770
peerDependencies:
27712771
"@sendbird/chat": ">=4.3.0 <5"
27722772
react: ">=16.8.6"
27732773
react-dom: ">=16.8.6"
2774-
checksum: ac178463097f84e7953889b379d34af200a1dc950a3933ab02affedf6bfcf88918c745791ad99dc22720d762b64d2b63ef71fbad7e36287e3d4b1d0dd74c088a
2774+
checksum: aac92fb0b963c4ee3f31eea05839cd49c5ad8561c427b5778731fdf61bcbc18076b329ab2866f12b776e77e9b2a9bfbba12263bcf25d4949a34ab80120548d2f
27752775
languageName: node
27762776
linkType: hard
27772777

2778-
"@sendbird/uikit-message-template@npm:^0.0.8":
2779-
version: 0.0.8
2780-
resolution: "@sendbird/uikit-message-template@npm:0.0.8"
2778+
"@sendbird/uikit-message-template@npm:^0.0.10":
2779+
version: 0.0.10
2780+
resolution: "@sendbird/uikit-message-template@npm:0.0.10"
27812781
peerDependencies:
27822782
react: ">=16.8.6"
2783-
checksum: 59c7f6f78fb6513d62b6fc4bde94bb8701c03d1f8a1e74cc4e9a0aff03d03d2ba813c04ea4c7b3c12a5d19d27f1270ff8e4f3a959329248a7b7d1e0dca4925c8
2783+
checksum: 18dfce8f7c83d37a94bc3cbca0f561d7ed10c4367bcb2d2bf9c9192fce8fa06cfd87e8f968c6f3ae6d464a5119338ee5167b1a055b777bd906664a225c7e486f
27842784
languageName: node
27852785
linkType: hard
27862786

@@ -2803,9 +2803,9 @@ __metadata:
28032803
"@rollup/plugin-node-resolve": ^15.2.3
28042804
"@rollup/plugin-replace": ^5.0.4
28052805
"@rollup/plugin-typescript": ^11.1.5
2806-
"@sendbird/chat": ^4.19.1
2807-
"@sendbird/react-uikit-message-template-view": ^0.0.8
2808-
"@sendbird/uikit-tools": ^0.0.8
2806+
"@sendbird/chat": ^4.19.2
2807+
"@sendbird/react-uikit-message-template-view": ^0.0.10
2808+
"@sendbird/uikit-tools": ^0.0.10
28092809
"@storybook/addon-essentials": ^8.5.0
28102810
"@storybook/manager-api": ^8.5.0
28112811
"@storybook/react-vite": ^8.5.0
@@ -2870,13 +2870,13 @@ __metadata:
28702870
languageName: unknown
28712871
linkType: soft
28722872

2873-
"@sendbird/uikit-tools@npm:^0.0.8":
2874-
version: 0.0.8
2875-
resolution: "@sendbird/uikit-tools@npm:0.0.8"
2873+
"@sendbird/uikit-tools@npm:^0.0.10":
2874+
version: 0.0.10
2875+
resolution: "@sendbird/uikit-tools@npm:0.0.10"
28762876
peerDependencies:
28772877
"@sendbird/chat": ">=4.10.5 <5"
28782878
react: ">=16.8.6"
2879-
checksum: 5c91ea3d628a317a62e28a6c8f78660844e7b07cb1a7aa7d4827798e08f8a381a19aa994645e92f37612e9deb87f7cef82dd45fc6f3ff0b143d7e0d6e162d663
2879+
checksum: 1b92fe4a5caced7efff4397fdf87912bc958b45f5eae1f986f78961759b18687901cc28bbc6f797a6fb0e1552e56ef5e04a16da0125883f18b00e99fbee5f44b
28802880
languageName: node
28812881
linkType: hard
28822882

0 commit comments

Comments
 (0)