Skip to content

Commit 7687716

Browse files
block and edit message feature disabled
1 parent 8e6adb3 commit 7687716

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/components/ChatHeaderActions.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,17 @@ import {
1313
handleConversationClear,
1414
handleMessageDelete,
1515
handleMessageDeleteForEveryOne,
16-
handleUpdateBlockUser,
1716
isAnyMessageWithinLast30Seconds,
1817
isLocalUser,
1918
} from '../helpers/chatHelpers';
20-
import { resetMessageSelections, toggleEditMessage } from '../redux/chatMessageDataSlice';
21-
import { setReplyMessage, setTextMessage } from '../redux/draftSlice';
22-
import {
23-
getSelectedChatMessages,
24-
getUserNameFromStore,
25-
useBlockedStatus,
26-
useSelectedChatMessages,
27-
} from '../redux/reduxHook';
19+
import { MIX_BARE_JID } from '../helpers/constants';
20+
import { getStringSet } from '../localization/stringSet';
21+
import { resetMessageSelections } from '../redux/chatMessageDataSlice';
22+
import { setReplyMessage } from '../redux/draftSlice';
23+
import { getSelectedChatMessages, useBlockedStatus, useSelectedChatMessages } from '../redux/reduxHook';
2824
import { FORWARD_MESSSAGE_SCREEN, MESSAGE_INFO_SCREEN } from '../screens/constants';
2925
import commonStyles from '../styles/commonStyles';
3026
import { chatInputRef } from './ChatInput';
31-
import { MIX_BARE_JID } from '../helpers/constants';
32-
import { getStringSet } from '../localization/stringSet';
3327

3428
export const RenderMessageSelectionCount = ({ userId }) => {
3529
const filtered = useSelectedChatMessages(userId) || [];
@@ -162,7 +156,7 @@ export const RenderMenuItems = ({ userId, chatUser }) => {
162156
RootNavigation.navigate(MESSAGE_INFO_SCREEN, { chatUser, msgId: filtered[0].msgId });
163157
handelResetMessageSelection(userId)();
164158
};
165-
159+
/**
166160
const handleEditMessage = () => {
167161
handelResetMessageSelection(userId)();
168162
dispatch(toggleEditMessage(filtered[0].msgId));
@@ -173,6 +167,7 @@ export const RenderMenuItems = ({ userId, chatUser }) => {
173167
chatInputRef?.current?.focus();
174168
}, 10);
175169
};
170+
176171
const hadleBlockUser = () => {
177172
setModalContent({
178173
visible: true,
@@ -187,7 +182,7 @@ export const RenderMenuItems = ({ userId, chatUser }) => {
187182
yesAction: handleUpdateBlockUser(userId, blockedStaus ? 0 : 1, chatUser),
188183
});
189184
};
190-
185+
*/
191186
/**
192187
const toggleSearch = () => {
193188
dispatch(toggleIsChatSearching(!getIsChatSearching()));
@@ -221,10 +216,12 @@ export const RenderMenuItems = ({ userId, chatUser }) => {
221216
now - filtered[0]?.timestamp <= config.editMessageTime &&
222217
(filtered[0]?.msgBody.message_type === 'text' || filtered[0]?.msgBody?.media?.caption)
223218
) {
219+
/**
224220
menuItems.push({
225221
label: stringSet.CHAT_SCREEN.EDIT_MESSAGE,
226222
formatter: handleEditMessage,
227223
});
224+
*/
228225
}
229226
}
230227

@@ -242,10 +239,12 @@ export const RenderMenuItems = ({ userId, chatUser }) => {
242239
}
243240

244241
if (!filtered.length && !MIX_BARE_JID.test(chatUser)) {
242+
/**
245243
menuItems.push({
246244
label: blockedStaus ? stringSet.CHAT_SCREEN.UNBLOCK_LABEL : stringSet.CHAT_SCREEN.BLOCK_LABEL,
247245
formatter: hadleBlockUser,
248246
});
247+
*/
249248
}
250249

251250
if (menuItems.length === 0) {

0 commit comments

Comments
 (0)