Skip to content

Commit bbd34ce

Browse files
committed
skip: apply review
1 parent 39c54fc commit bbd34ce

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

packages/uikit-chat-hooks/src/handler/useChannelHandler.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ export const useChannelHandler = (
1919
const handler = new sdk.ChannelHandler();
2020
const handlerKeys = Object.keys(handler) as (keyof typeof handler)[];
2121
handlerKeys.forEach((key) => {
22-
if (handlerRef.current[key]) {
23-
handler[key] = (...args: unknown[]) => {
24-
// @ts-ignore
25-
handlerRef.current[key](...args);
26-
};
27-
}
22+
handler[key] = (...args: unknown[]) => {
23+
// @ts-ignore
24+
handlerRef.current[key]?.(...args);
25+
};
2826
});
2927

3028
sdk.addChannelHandler(handlerId, handler);

packages/uikit-react-native/src/components/GroupChannelPreviewContainer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ const GroupChannelPreviewContainer = ({ onPress, onLongPress, channel }: Props)
4040
const forceUpdate = useForceUpdate();
4141

4242
if (features.channelListTypingIndicatorEnabled) {
43-
const id = useUniqId('GroupChannelPreviewContainer');
44-
useChannelHandler(sdk, `GroupChannelPreviewContainer_TypingIndicator_${id}`, {
43+
const typingId = useUniqId('GroupChannelPreviewContainer');
44+
useChannelHandler(sdk, `GroupChannelPreviewContainer_TypingIndicator_${typingId}`, {
4545
onTypingStatusUpdated(eventChannel) {
4646
if (isDifferentChannel(channel, eventChannel)) return;
4747
setTypingUsers(eventChannel.getTypingUsers());
@@ -50,8 +50,8 @@ const GroupChannelPreviewContainer = ({ onPress, onLongPress, channel }: Props)
5050
}
5151

5252
if (features.channelListMessageReceiptStatusEnabled) {
53-
const id = useUniqId('GroupChannelPreviewContainer');
54-
useChannelHandler(sdk, `GroupChannelPreviewContainer_ReceiptStatus_${id}`, {
53+
const receiptId = useUniqId('GroupChannelPreviewContainer');
54+
useChannelHandler(sdk, `GroupChannelPreviewContainer_ReceiptStatus_${receiptId}`, {
5555
onDeliveryReceiptUpdated(eventChannel) {
5656
if (isDifferentChannel(channel, eventChannel)) return;
5757
if (!eventChannel.isGroupChannel() || !eventChannel.lastMessage) return;

packages/uikit-react-native/src/components/SBUPressable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function getComponent(as?: Components) {
3434
const SBUPressable = <T extends Components>({ as, ...props }: Props<T>) => {
3535
const Renderer = getComponent(as);
3636
// @ts-ignore
37-
return <Renderer {...props} delayLongPress={DEFAULT_LONG_PRESS_DELAY} />;
37+
return <Renderer delayLongPress={DEFAULT_LONG_PRESS_DELAY} {...props} />;
3838
};
3939

4040
export default SBUPressable;

0 commit comments

Comments
 (0)