Reduce noisy runtime logging in frontend flows.
This keeps chat, notification, and post interactions cleaner in production while preserving error-level visibility.
This commit is contained in:
@@ -312,14 +312,8 @@ export const MessageBubble: React.FC<MessageBubbleProps> = ({
|
||||
memberMap={memberMap}
|
||||
replyMessage={getReplyMessage()}
|
||||
getSenderInfo={getSenderInfo}
|
||||
onAtPress={(userId) => {
|
||||
// TODO: 跳转到用户资料页
|
||||
console.log('At pressed:', userId);
|
||||
}}
|
||||
onReplyPress={(messageId) => {
|
||||
// TODO: 滚动到被回复的消息
|
||||
console.log('Reply pressed:', messageId);
|
||||
}}
|
||||
onAtPress={() => undefined}
|
||||
onReplyPress={() => undefined}
|
||||
onImagePress={(url) => {
|
||||
// 查找点击的图片索引
|
||||
const clickIndex = imageSegments.findIndex(img => img.url === url);
|
||||
@@ -343,9 +337,7 @@ export const MessageBubble: React.FC<MessageBubbleProps> = ({
|
||||
handleLongPress();
|
||||
}
|
||||
}}
|
||||
onLinkPress={(url) => {
|
||||
console.log('Link pressed:', url);
|
||||
}}
|
||||
onLinkPress={() => undefined}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -270,7 +270,6 @@ export const useChatScreen = () => {
|
||||
shouldAutoScrollOnEnterRef.current = true;
|
||||
autoScrollTimersRef.current.forEach(clearTimeout);
|
||||
autoScrollTimersRef.current = [];
|
||||
console.log('[ChatScreen] 会话切换,重置状态');
|
||||
}, [conversationId]);
|
||||
|
||||
// 组件卸载时清理定时器
|
||||
@@ -389,8 +388,6 @@ export const useChatScreen = () => {
|
||||
|
||||
// 【改造】加载更多历史消息
|
||||
const loadMoreHistory = useCallback(async () => {
|
||||
console.log('[ChatScreen] 加载更多历史消息');
|
||||
|
||||
if (!conversationId || !hasMoreHistory || loadingMore) {
|
||||
return;
|
||||
}
|
||||
@@ -730,8 +727,6 @@ export const useChatScreen = () => {
|
||||
try {
|
||||
const segments = buildTextSegments(trimmedText, replyingTo);
|
||||
|
||||
console.log('[ChatScreen] handleSend - replyingTo:', replyingTo?.id, 'segments:', JSON.stringify(segments));
|
||||
|
||||
if (isGroupChat && routeGroupId) {
|
||||
// 群聊消息发送
|
||||
websocketService.sendGroupChatMessage({
|
||||
@@ -1041,7 +1036,6 @@ export const useChatScreen = () => {
|
||||
setFirstSeq(0);
|
||||
setHasMoreHistory(true);
|
||||
await clearConversationMessages(conversationId);
|
||||
console.log('[ChatScreen] 会话消息已清空:', conversationId);
|
||||
// 刷新消息列表
|
||||
await refreshMessages();
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user