@cometchat/chat-uikit-react-native 5.2.8 → 5.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/package.json +2 -2
  2. package/src/CometChatConversations/CometChatConversations.tsx +8 -1
  3. package/src/CometChatGroups/CometChatGroups.tsx +5 -3
  4. package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +78 -18
  5. package/src/CometChatMessageList/CometChatMessageList.tsx +1181 -577
  6. package/src/CometChatMessageList/components/MessageListItem.tsx +127 -0
  7. package/src/CometChatMessageList/components/MessageModals.tsx +60 -0
  8. package/src/CometChatMessageList/components/MessageOptionsSheet.tsx +130 -0
  9. package/src/CometChatMessageList/components/ReactionModals.tsx +70 -0
  10. package/src/CometChatUsers/CometChatUsers.tsx +4 -1
  11. package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +27 -36
  12. package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +13 -9
  13. package/src/shared/base/Types.ts +1 -0
  14. package/src/shared/constants/UIKitConstants.ts +1 -0
  15. package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +4 -0
  16. package/src/shared/events/CometChatUIEventHandler/Listener.ts +4 -1
  17. package/src/shared/events/conversations.ts +1 -0
  18. package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +71 -14
  19. package/src/shared/framework/MessageDataSource.tsx +79 -17
  20. package/src/shared/index.ts +2 -0
  21. package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +3 -1
  22. package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +3 -1
  23. package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +3 -1
  24. package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +3 -1
  25. package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +3 -1
  26. package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +3 -1
  27. package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +3 -1
  28. package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +3 -1
  29. package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +3 -1
  30. package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +3 -1
  31. package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +3 -1
  32. package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +3 -1
  33. package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +3 -1
  34. package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +3 -1
  35. package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +3 -1
  36. package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +3 -1
  37. package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +3 -1
  38. package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +3 -1
  39. package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +7 -4
  40. package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +20 -12
  41. package/src/shared/views/CometChatBadge/CometChatBadge.tsx +6 -3
  42. package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +2 -1
  43. package/src/shared/views/CometChatList/CometChatList.tsx +20 -1
  44. package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +1 -1
  45. package/src/shared/views/CometChatNewMessageIndicator/CometChatNewMessageIndicator.tsx +55 -0
  46. package/src/shared/views/CometChatNewMessageIndicator/index.ts +3 -0
  47. package/src/shared/views/CometChatNewMessageIndicator/styles.ts +33 -0
  48. package/src/shared/views/CometChatRetryButton/CometChatRetryButton.tsx +54 -0
  49. package/src/shared/views/CometChatRetryButton/index.ts +3 -0
  50. package/src/shared/views/index.ts +15 -0
  51. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  52. package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
  53. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  54. package/android/.gradle/7.4/gc.properties +0 -0
  55. package/android/.gradle/vcs-1/gc.properties +0 -0
@@ -1,6 +1,6 @@
1
1
  import { CometChat } from "@cometchat/chat-sdk-react-native";
2
2
  import React, { JSX } from "react";
3
- import { ColorValue, StyleProp, Text, TextStyle } from "react-native";
3
+ import { ColorValue, StyleProp, Text, TextStyle, View } from "react-native";
4
4
  import { CometChatUIKit } from "../../CometChatUiKit";
5
5
  import {
6
6
  MentionsTargetElement,
@@ -25,6 +25,8 @@ const t = getCometChatTranslation();
25
25
  type MentionsSubStyle = {
26
26
  textStyle?: TextStyle;
27
27
  selfTextStyle?: TextStyle;
28
+ backgroundColor?: ColorValue;
29
+ selfBackgroundColor?: ColorValue;
28
30
  };
29
31
 
30
32
  type MentionContext = "composer" | "conversation" | "incoming" | "outgoing";
@@ -71,7 +73,7 @@ export class CometChatMentionsFormatter extends CometChatTextFormatter {
71
73
  private incomingBubbleStyle: MentionsSubStyle;
72
74
  private outgoingBubbleStyle: MentionsSubStyle;
73
75
  private currentContext: MentionContext = "incoming";
74
- private resolveStyle(isSelf: boolean): TextStyle {
76
+ private resolveStyle(isSelf: boolean): { textStyle: TextStyle; backgroundColor: ColorValue | undefined } {
75
77
  let style: MentionsSubStyle;
76
78
  switch (this.currentContext) {
77
79
  case "composer":
@@ -86,7 +88,9 @@ export class CometChatMentionsFormatter extends CometChatTextFormatter {
86
88
  default:
87
89
  style = this.incomingBubbleStyle;
88
90
  }
89
- return isSelf ? (style.selfTextStyle ?? {}) : (style.textStyle ?? {});
91
+ const textStyle = isSelf ? (style.selfTextStyle ?? {}) : (style.textStyle ?? {});
92
+ const backgroundColor = isSelf ? style.selfBackgroundColor : style.backgroundColor;
93
+ return { textStyle, backgroundColor };
90
94
  }
91
95
 
92
96
  /**
@@ -132,22 +136,64 @@ export class CometChatMentionsFormatter extends CometChatTextFormatter {
132
136
  ? loggedInUser
133
137
  : (themeOrUser as CometChat.User | undefined);
134
138
 
135
- const fallback: MentionsSubStyle = {
139
+ // Incoming bubble style - purple/blue text with purple background
140
+ const incomingFallback: MentionsSubStyle = {
136
141
  textStyle: { fontWeight: "700", fontSize: 14, lineHeight: 19.6, color: "#6852D6" },
137
142
  selfTextStyle: { fontWeight: "700", fontSize: 14, lineHeight: 19.6, color: "#FFAB00" },
143
+ backgroundColor: "rgba(104, 82, 214, 0.15)", // Purple/blue matching text color
144
+ selfBackgroundColor: "rgba(255, 171, 0, 0.2)", // Yellow/warning for @all
138
145
  };
139
146
 
140
- const fromTheme = (c: ColorValue): MentionsSubStyle => {
147
+ // Outgoing bubble style - white text with white background
148
+ const outgoingFallback: MentionsSubStyle = {
149
+ textStyle: { fontWeight: "700", fontSize: 14, lineHeight: 19.6, color: "#FFFFFF" },
150
+ selfTextStyle: { fontWeight: "700", fontSize: 14, lineHeight: 19.6, color: "#FFAB00" },
151
+ backgroundColor: "rgba(255, 255, 255, 0.2)", // White matching text color
152
+ selfBackgroundColor: "rgba(255, 171, 0, 0.2)", // Yellow/warning for @all
153
+ };
154
+
155
+ const incomingFromTheme = (c: ColorValue): MentionsSubStyle => {
141
156
  const baseStyle = theme?.typography?.body?.bold || {};
142
157
  return {
143
158
  textStyle: { ...baseStyle, color: c },
144
159
  selfTextStyle: { ...baseStyle, color: theme?.color?.warning || "#FFAB00" },
160
+ backgroundColor: "rgba(104, 82, 214, 0.15)", // Purple/blue matching primary color
161
+ selfBackgroundColor: "rgba(255, 171, 0, 0.2)", // Yellow/warning for @all
145
162
  };
146
163
  };
147
164
 
148
- this.incomingBubbleStyle = theme ? fromTheme(theme.color.receiveBubbleTextHighlight) : fallback;
149
- this.outgoingBubbleStyle = theme ? fromTheme(theme.color.sendBubbleTextHighlight) : fallback;
150
- this.composerStyle = this.incomingBubbleStyle; // reasonable defaults
165
+ const outgoingFromTheme = (c: ColorValue): MentionsSubStyle => {
166
+ const baseStyle = theme?.typography?.body?.bold || {};
167
+ return {
168
+ textStyle: { ...baseStyle, color: c },
169
+ selfTextStyle: { ...baseStyle, color: theme?.color?.warning || "#FFAB00" },
170
+ backgroundColor: "rgba(255, 255, 255, 0.2)", // White matching outgoing text color
171
+ selfBackgroundColor: "rgba(255, 171, 0, 0.2)", // Yellow/warning for @all
172
+ };
173
+ };
174
+
175
+ // Composer-specific style with purple/blue background matching the text color
176
+ const composerFallback: MentionsSubStyle = {
177
+ textStyle: { fontWeight: "700", fontSize: 14, lineHeight: 19.6, color: "#6852D6" },
178
+ selfTextStyle: { fontWeight: "700", fontSize: 14, lineHeight: 19.6, color: "#FFAB00" },
179
+ backgroundColor: "rgba(104, 82, 214, 0.15)", // Purple/blue matching text color
180
+ selfBackgroundColor: "rgba(255, 171, 0, 0.2)", // Yellow/warning for @all
181
+ };
182
+
183
+ const composerFromTheme = (): MentionsSubStyle => {
184
+ const baseStyle = theme?.typography?.body?.bold || {};
185
+ const primaryColor = theme?.color?.primary || "#6852D6";
186
+ return {
187
+ textStyle: { ...baseStyle, color: primaryColor },
188
+ selfTextStyle: { ...baseStyle, color: theme?.color?.warning || "#FFAB00" },
189
+ backgroundColor: "rgba(104, 82, 214, 0.15)", // Purple/blue background
190
+ selfBackgroundColor: "rgba(255, 171, 0, 0.2)", // Yellow/warning for @all
191
+ };
192
+ };
193
+
194
+ this.incomingBubbleStyle = theme ? incomingFromTheme(theme.color.receiveBubbleTextHighlight) : incomingFallback;
195
+ this.outgoingBubbleStyle = theme ? outgoingFromTheme(theme.color.sendBubbleTextHighlight) : outgoingFallback;
196
+ this.composerStyle = theme ? composerFromTheme() : composerFallback;
151
197
  this.conversationStyle = this.incomingBubbleStyle;
152
198
  }
153
199
 
@@ -584,23 +630,29 @@ export class CometChatMentionsFormatter extends CometChatTextFormatter {
584
630
  this.setContext(isOutgoing ? "outgoing" : "incoming");
585
631
  }
586
632
 
587
- const textStyle = this.resolveStyle(isSelf);
633
+ const { textStyle, backgroundColor } = this.resolveStyle(isSelf);
588
634
 
589
635
  let onPressProp =
590
636
  this.temp && !isAlias
591
637
  ? { onPress: (event: any) => this.onMentionClick(event, segment) }
592
638
  : {}; // still suppress click for alias
593
639
 
640
+ const mentionContainerStyle = backgroundColor ? {
641
+ backgroundColor,
642
+ borderRadius: 4,
643
+ paddingHorizontal: 2,
644
+ } : {};
645
+
594
646
  if (this.target === MentionsTargetElement.textbubble) {
595
647
  return (
596
- <Text suppressHighlighting={true} key={index} {...onPressProp} style={[textStyle]}>
648
+ <Text suppressHighlighting={true} key={index} {...onPressProp} style={[textStyle, mentionContainerStyle]}>
597
649
  {userRegistry[segment]}
598
650
  </Text>
599
651
  );
600
652
  }
601
653
 
602
654
  return (
603
- <Text suppressHighlighting={true} key={index} {...onPressProp} style={[textStyle]}>
655
+ <Text suppressHighlighting={true} key={index} {...onPressProp} style={[textStyle, mentionContainerStyle]}>
604
656
  {userRegistry[segment]}
605
657
  </Text>
606
658
  );
@@ -610,11 +662,16 @@ export class CometChatMentionsFormatter extends CometChatTextFormatter {
610
662
  (it) => it.underlyingText === `<@all:${segment}>`
611
663
  );
612
664
  if (aliasItem) {
613
- const styleResolved = this.resolveStyle(true);
665
+ const { textStyle: styleResolved, backgroundColor } = this.resolveStyle(true);
666
+ const mentionContainerStyle = backgroundColor ? {
667
+ backgroundColor,
668
+ borderRadius: 4,
669
+ paddingHorizontal: 2,
670
+ } : {};
614
671
  // If context is 'conversation', render @all and description inline
615
672
  if (this.currentContext === "conversation") {
616
673
  return (
617
- <Text suppressHighlighting={true} key={index} style={[styleResolved]}>
674
+ <Text suppressHighlighting={true} key={index} style={[styleResolved, mentionContainerStyle]}>
618
675
  <Text style={[styleResolved, { fontWeight: "700" }]}>
619
676
  @{aliasItem.promptText}
620
677
  </Text>
@@ -626,7 +683,7 @@ export class CometChatMentionsFormatter extends CometChatTextFormatter {
626
683
  );
627
684
  }
628
685
  return (
629
- <Text suppressHighlighting={true} key={index} style={[styleResolved]}>
686
+ <Text suppressHighlighting={true} key={index} style={[styleResolved, mentionContainerStyle]}>
630
687
  {aliasItem.promptText}
631
688
  </Text>
632
689
  );
@@ -294,6 +294,26 @@ export class MessageDataSource implements DataSource {
294
294
  ),
295
295
  };
296
296
  }
297
+
298
+ getMarkAsUnreadOption(theme: CometChatTheme): CometChatMessageOption {
299
+ return {
300
+ id: MessageOptionConstants.markAsUnread,
301
+ title: t("MARK_AS_UNREAD"),
302
+ icon: (
303
+ <Icon
304
+ name='unread'
305
+ color={
306
+ theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.tintColor
307
+ }
308
+ height={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.height}
309
+ width={theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconStyle?.width}
310
+ containerStyle={
311
+ theme.messageListStyles.messageOptionsStyles?.optionsItemStyle?.iconContainerStyle
312
+ }
313
+ ></Icon>
314
+ ),
315
+ };
316
+ }
297
317
  // getForwardOption(): CometChatMessageOption {
298
318
  // return {
299
319
  // id: MessageOptionConstants.forwardMessage,
@@ -352,30 +372,34 @@ export class MessageDataSource implements DataSource {
352
372
  let messageOptionList: CometChatMessageOption[] = [];
353
373
 
354
374
  if (isDeletedMessage(messageObject)) return messageOptionList;
375
+
376
+ // reply in thread
355
377
  if (
356
378
  this.validateOption(
357
379
  loggedInUser,
358
380
  messageObject,
359
- MessageOptionConstants.replyMessage,
381
+ MessageOptionConstants.replyInThread,
360
382
  group,
361
383
  additionalParams
362
384
  )
363
385
  ) {
364
- messageOptionList.push(this.getReplyOption(theme));
386
+ messageOptionList.push(this.getReplyInThreadOption(theme));
365
387
  }
366
388
 
389
+ // reply
367
390
  if (
368
391
  this.validateOption(
369
392
  loggedInUser,
370
393
  messageObject,
371
- MessageOptionConstants.replyInThread,
394
+ MessageOptionConstants.replyMessage,
372
395
  group,
373
396
  additionalParams
374
397
  )
375
398
  ) {
376
- messageOptionList.push(this.getReplyInThreadOption(theme));
399
+ messageOptionList.push(this.getReplyOption(theme));
377
400
  }
378
401
 
402
+ // share
379
403
  if (
380
404
  this.validateOption(
381
405
  loggedInUser,
@@ -388,6 +412,7 @@ export class MessageDataSource implements DataSource {
388
412
  messageOptionList.push(this.getShareOption(theme));
389
413
  }
390
414
 
415
+ // copy
391
416
  if (
392
417
  this.validateOption(
393
418
  loggedInUser,
@@ -400,64 +425,79 @@ export class MessageDataSource implements DataSource {
400
425
  messageOptionList.push(this.getCopyOption(theme));
401
426
  }
402
427
 
428
+ // mark as unread
429
+ if(
430
+ this.validateOption(
431
+ loggedInUser,
432
+ messageObject,
433
+ MessageOptionConstants.markAsUnread,
434
+ group,
435
+ additionalParams,
436
+
437
+ )
438
+ ) {
439
+ messageOptionList.push(this.getMarkAsUnreadOption(theme));
440
+ }
441
+
442
+ // report
403
443
  if (
404
444
  this.validateOption(
405
445
  loggedInUser,
406
446
  messageObject,
407
- MessageOptionConstants.editMessage,
447
+ MessageOptionConstants.reportMessage,
408
448
  group,
409
449
  additionalParams
410
450
  )
411
451
  ) {
412
- messageOptionList.push(this.getEditOption(theme));
452
+ messageOptionList.push(this.getReportOption(theme));
413
453
  }
414
454
 
455
+ // message privately
415
456
  if (
416
457
  this.validateOption(
417
458
  loggedInUser,
418
459
  messageObject,
419
- MessageOptionConstants.messageInformation,
460
+ MessageOptionConstants.sendMessagePrivately,
420
461
  group,
421
462
  additionalParams
422
463
  )
423
464
  ) {
424
- messageOptionList.push(this.getInformationOption(theme));
465
+ messageOptionList.push(this.getPrivateMessageOption(theme));
425
466
  }
426
-
427
467
  if (
428
468
  this.validateOption(
429
469
  loggedInUser,
430
470
  messageObject,
431
- MessageOptionConstants.deleteMessage,
471
+ MessageOptionConstants.editMessage,
432
472
  group,
433
473
  additionalParams
434
474
  )
435
475
  ) {
436
- messageOptionList.push(this.getDeleteOption(theme));
476
+ messageOptionList.push(this.getEditOption(theme));
437
477
  }
438
478
 
439
- if (
479
+ if (
440
480
  this.validateOption(
441
481
  loggedInUser,
442
482
  messageObject,
443
- MessageOptionConstants.reportMessage,
483
+ MessageOptionConstants.messageInformation,
444
484
  group,
445
485
  additionalParams
446
486
  )
447
487
  ) {
448
- messageOptionList.push(this.getReportOption(theme));
488
+ messageOptionList.push(this.getInformationOption(theme));
449
489
  }
450
490
 
451
491
  if (
452
492
  this.validateOption(
453
493
  loggedInUser,
454
494
  messageObject,
455
- MessageOptionConstants.sendMessagePrivately,
495
+ MessageOptionConstants.deleteMessage,
456
496
  group,
457
497
  additionalParams
458
498
  )
459
499
  ) {
460
- messageOptionList.push(this.getPrivateMessageOption(theme));
500
+ messageOptionList.push(this.getDeleteOption(theme));
461
501
  }
462
502
 
463
503
  return messageOptionList;
@@ -715,6 +755,15 @@ export class MessageDataSource implements DataSource {
715
755
  ) {
716
756
  return true;
717
757
  }
758
+
759
+
760
+ if (
761
+ MessageOptionConstants.markAsUnread === optionId &&
762
+ !isSentByMe &&
763
+ !additionalParams?.hideMarkAsUnreadOption
764
+ ) {
765
+ return true;
766
+ }
718
767
 
719
768
  return false;
720
769
  }
@@ -813,6 +862,18 @@ export class MessageDataSource implements DataSource {
813
862
  messageOptionList.push(this.getPrivateMessageOption(theme));
814
863
  }
815
864
 
865
+ if(
866
+ this.validateOption(
867
+ loggedInUser,
868
+ messageObject,
869
+ MessageOptionConstants.markAsUnread,
870
+ group,
871
+ additionalParams
872
+ )
873
+ ) {
874
+ messageOptionList.push(this.getMarkAsUnreadOption(theme));
875
+ }
876
+
816
877
  return messageOptionList;
817
878
  }
818
879
 
@@ -1012,8 +1073,9 @@ export class MessageDataSource implements DataSource {
1012
1073
 
1013
1074
  // Wrap with TouchableOpacity for click handling
1014
1075
  if (additionalParams?.onReplyClick && !isQuotedMessageDeleted) {
1076
+ const replyTouchableStyle = { padding: theme.spacing.padding.p0_5 };
1015
1077
  return (
1016
- <TouchableOpacity onPress={handleReplyClick} activeOpacity={0.7}>
1078
+ <TouchableOpacity onPress={handleReplyClick} activeOpacity={0.7} style={replyTouchableStyle}>
1017
1079
  {previewComponent}
1018
1080
  </TouchableOpacity>
1019
1081
  );
@@ -62,6 +62,7 @@ export {
62
62
  CometChatQuickReactions,
63
63
  CometChatReactionList,
64
64
  CometChatReactions,
65
+ CometChatRetryButton,
65
66
  CometChatStatusIndicator,
66
67
  CometChatSuggestionList,
67
68
  CometChatTextBubble,
@@ -87,6 +88,7 @@ export type{
87
88
  CometChatMessageInputInterface,
88
89
  CometChatReactionListInterface,
89
90
  CometChatReactionsInterface,
91
+ CometChatRetryButtonProps,
90
92
  CometChatStatusIndicatorInterface,
91
93
  CometChatSuggestionListInterface,
92
94
  CometChatTextBubbleInterface,
@@ -481,5 +481,7 @@
481
481
  "CHAT_HISTORY": "Chat-Verlauf",
482
482
  "ASK_ANYTHING": "Frag etwas...",
483
483
  "AI_ASSISTANT": "AI-Assistent",
484
- "MESSAGE_REPORTED": "Nachricht gemeldet"
484
+ "MESSAGE_REPORTED": "Nachricht gemeldet",
485
+ "MARK_AS_UNREAD": "Ungelesen markieren",
486
+ "NEW": "Neu"
485
487
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Conversations",
502
502
  "SEARCH_FILTER_MESSAGES": "Messages",
503
503
  "SEARCH_NO_MESSAGES": "No messages",
504
- "MESSAGE_REPORTED": "Message reported"
504
+ "MESSAGE_REPORTED": "Message reported",
505
+ "MARK_AS_UNREAD": "Mark Unread",
506
+ "NEW": "New"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Conversaciones",
502
502
  "SEARCH_FILTER_MESSAGES": "Mensajes",
503
503
  "SEARCH_NO_MESSAGES": "No hay mensajes",
504
- "MESSAGE_REPORTED": "Mensaje reportado"
504
+ "MESSAGE_REPORTED": "Mensaje reportado",
505
+ "MARK_AS_UNREAD": "Marcar no leído",
506
+ "NEW": "Nuevo"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Conversations",
502
502
  "SEARCH_FILTER_MESSAGES": "Messages",
503
503
  "SEARCH_NO_MESSAGES": "Aucun message",
504
- "MESSAGE_REPORTED": "Message signalé"
504
+ "MESSAGE_REPORTED": "Message signalé",
505
+ "MARK_AS_UNREAD": "Marquer non lu",
506
+ "NEW": "Nouveau"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "बातचीत",
502
502
  "SEARCH_FILTER_MESSAGES": "संदेश",
503
503
  "SEARCH_NO_MESSAGES": "कोई संदेश नहीं",
504
- "MESSAGE_REPORTED": "संदेश रिपोर्ट किया गया"
504
+ "MESSAGE_REPORTED": "संदेश रिपोर्ट किया गया",
505
+ "MARK_AS_UNREAD": "अपठित करें",
506
+ "NEW": "नया"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Beszélgetések",
502
502
  "SEARCH_FILTER_MESSAGES": "Üzenetek",
503
503
  "SEARCH_NO_MESSAGES": "Nincsenek üzenetek",
504
- "MESSAGE_REPORTED": "Üzenet bejelentve"
504
+ "MESSAGE_REPORTED": "Üzenet jelentve",
505
+ "MARK_AS_UNREAD": "Olvasatlanként jelöl",
506
+ "NEW": "Új"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Conversazioni",
502
502
  "SEARCH_FILTER_MESSAGES": "Messaggi",
503
503
  "SEARCH_NO_MESSAGES": "Nessun messaggio",
504
- "MESSAGE_REPORTED": "Messaggio segnalato"
504
+ "MESSAGE_REPORTED": "Messaggio segnalato",
505
+ "MARK_AS_UNREAD": "Contrassegna non letto",
506
+ "NEW": "Nuovo"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "会話",
502
502
  "SEARCH_FILTER_MESSAGES": "メッセージ",
503
503
  "SEARCH_NO_MESSAGES": "メッセージがありません",
504
- "MESSAGE_REPORTED": "メッセージが報告されました"
504
+ "MESSAGE_REPORTED": "メッセージが報告されました",
505
+ "MARK_AS_UNREAD": "未読にする",
506
+ "NEW": "新規"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "대화",
502
502
  "SEARCH_FILTER_MESSAGES": "메시지",
503
503
  "SEARCH_NO_MESSAGES": "메시지가 없습니다",
504
- "MESSAGE_REPORTED": "메시지가 신고되었습니다"
504
+ "MESSAGE_REPORTED": "메시지가 신고되었습니다",
505
+ "MARK_AS_UNREAD": "읽지 않음 표시",
506
+ "NEW": "새로운"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Pokalbiai",
502
502
  "SEARCH_FILTER_MESSAGES": "Žinutės",
503
503
  "SEARCH_NO_MESSAGES": "Nėra žinučių",
504
- "MESSAGE_REPORTED": "Pranešimas praneštas"
504
+ "MESSAGE_REPORTED": "Pranešimas praneštas",
505
+ "MARK_AS_UNREAD": "Pažymėti neskaitytą",
506
+ "NEW": "Naujas"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Perbualan",
502
502
  "SEARCH_FILTER_MESSAGES": "Mesej",
503
503
  "SEARCH_NO_MESSAGES": "Tiada mesej",
504
- "MESSAGE_REPORTED": "Mesej dilaporkan"
504
+ "MESSAGE_REPORTED": "Mesej dilaporkan",
505
+ "MARK_AS_UNREAD": "Tandai belum dibaca",
506
+ "NEW": "Baru"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Gesprekken",
502
502
  "SEARCH_FILTER_MESSAGES": "Berichten",
503
503
  "SEARCH_NO_MESSAGES": "Geen berichten",
504
- "MESSAGE_REPORTED": "Bericht gemeld"
504
+ "MESSAGE_REPORTED": "Bericht gemeld",
505
+ "MARK_AS_UNREAD": "Ongelezen markeren",
506
+ "NEW": "Nieuw"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Conversas",
502
502
  "SEARCH_FILTER_MESSAGES": "Mensagens",
503
503
  "SEARCH_NO_MESSAGES": "Nenhuma mensagem",
504
- "MESSAGE_REPORTED": "Mensagem denunciada"
504
+ "MESSAGE_REPORTED": "Mensagem denunciada",
505
+ "MARK_AS_UNREAD": "Marcar não lido",
506
+ "NEW": "Novo"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Беседы",
502
502
  "SEARCH_FILTER_MESSAGES": "Сообщения",
503
503
  "SEARCH_NO_MESSAGES": "Нет сообщений",
504
- "MESSAGE_REPORTED": "Сообщение отправлено на жалобу"
504
+ "MESSAGE_REPORTED": "Сообщение отправлено на жалобу",
505
+ "MARK_AS_UNREAD": "Отметить непрочитанным",
506
+ "NEW": "Новый"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Konversationer",
502
502
  "SEARCH_FILTER_MESSAGES": "Meddelanden",
503
503
  "SEARCH_NO_MESSAGES": "Inga meddelanden",
504
- "MESSAGE_REPORTED": "Meddelandet har rapporterats"
504
+ "MESSAGE_REPORTED": "Meddelandet har rapporterats",
505
+ "MARK_AS_UNREAD": "Markera oläst",
506
+ "NEW": "Ny"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "Sohbetler",
502
502
  "SEARCH_FILTER_MESSAGES": "Mesajlar",
503
503
  "SEARCH_NO_MESSAGES": "Mesaj yok",
504
- "MESSAGE_REPORTED": "Mesaj bildirildi"
504
+ "MESSAGE_REPORTED": "Mesaj bildirildi",
505
+ "MARK_AS_UNREAD": "Okunmamış işaretle",
506
+ "NEW": "Yeni"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "会话",
502
502
  "SEARCH_FILTER_MESSAGES": "消息",
503
503
  "SEARCH_NO_MESSAGES": "没有消息",
504
- "MESSAGE_REPORTED": "消息已举报"
504
+ "MESSAGE_REPORTED": "消息已举报",
505
+ "MARK_AS_UNREAD": "标记未读",
506
+ "NEW": "新"
505
507
  }
@@ -501,5 +501,7 @@
501
501
  "SEARCH_FILTER_CONVERSATIONS": "對話",
502
502
  "SEARCH_FILTER_MESSAGES": "訊息",
503
503
  "SEARCH_NO_MESSAGES": "沒有訊息",
504
- "MESSAGE_REPORTED": "訊息已回報"
504
+ "MESSAGE_REPORTED": "訊息已檢舉",
505
+ "MARK_AS_UNREAD": "標記未讀",
506
+ "NEW": "新"
505
507
  }
@@ -1,4 +1,4 @@
1
- import React, { JSX, useCallback, useMemo } from "react";
1
+ import React, { JSX, useCallback, useMemo, useState } from "react";
2
2
  import {
3
3
  FlatList,
4
4
  ImageSourcePropType,
@@ -6,7 +6,6 @@ import {
6
6
  Pressable,
7
7
  Text,
8
8
  TextStyle,
9
- View,
10
9
  ViewStyle,
11
10
  } from "react-native";
12
11
  import { useTheme } from "../../../theme";
@@ -36,6 +35,8 @@ const OptionListView = ({
36
35
  }>;
37
36
  }) => {
38
37
  const theme = useTheme();
38
+ const [isPressed, setIsPressed] = useState(false);
39
+
39
40
  const renderIcon = useCallback(() => {
40
41
  return (
41
42
  <Icon icon={icon} imageStyle={style?.iconStyle} containerStyle={style?.iconContainerStyle} />
@@ -46,9 +47,11 @@ const OptionListView = ({
46
47
  <Pressable
47
48
  key={id}
48
49
  onPress={onPress}
49
- style={({ pressed }) => [
50
+ onPressIn={() => setIsPressed(true)}
51
+ onPressOut={() => setIsPressed(false)}
52
+ style={[
50
53
  style?.containerStyle,
51
- pressed && { backgroundColor: theme.color.background4 },
54
+ isPressed && { backgroundColor: theme.color.background4 },
52
55
  ]}
53
56
  >
54
57
  {renderIcon()}