@ethora/chat-component-rn 26.7.4 → 26.7.5

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 (288) hide show
  1. package/CHANGELOG.md +0 -54
  2. package/README.md +8 -31
  3. package/lib/commonjs/assets/icons.js +2 -7
  4. package/lib/commonjs/assets/icons.js.map +1 -1
  5. package/lib/commonjs/components/Header/HeaderRoomList.js +6 -20
  6. package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
  7. package/lib/commonjs/components/MainComponents/ChatRoom.js +14 -36
  8. package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
  9. package/lib/commonjs/components/MainComponents/MessageList.js +23 -7
  10. package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
  11. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js +13 -14
  12. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  13. package/lib/commonjs/components/MainComponents/RoomList.js +32 -62
  14. package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
  15. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +98 -309
  16. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
  17. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +110 -320
  18. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  19. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +213 -552
  20. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  21. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +2 -6
  22. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  23. package/lib/commonjs/components/Modals/Modal/Modal.js +0 -8
  24. package/lib/commonjs/components/Modals/Modal/Modal.js.map +1 -1
  25. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js +1 -2
  26. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  27. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +104 -202
  28. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  29. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js +0 -8
  30. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  31. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +2 -4
  32. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  33. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +21 -7
  34. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  35. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +244 -507
  36. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  37. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +46 -74
  38. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  39. package/lib/commonjs/components/Modals/styledModalComponents.js +2 -9
  40. package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
  41. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +7 -17
  42. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
  43. package/lib/commonjs/components/styled/SendInput.js +11 -80
  44. package/lib/commonjs/components/styled/SendInput.js.map +1 -1
  45. package/lib/commonjs/components/styled/StyledComponents.js +3 -9
  46. package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
  47. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +4 -11
  48. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  49. package/lib/commonjs/context/xmppProvider.js +35 -6
  50. package/lib/commonjs/context/xmppProvider.js.map +1 -1
  51. package/lib/commonjs/helpers/updateMessagesTillLast.js +40 -12
  52. package/lib/commonjs/helpers/updateMessagesTillLast.js.map +1 -1
  53. package/lib/commonjs/hooks/useChatRoomFocus.js +9 -3
  54. package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
  55. package/lib/commonjs/hooks/useLogout.js +5 -0
  56. package/lib/commonjs/hooks/useLogout.js.map +1 -1
  57. package/lib/commonjs/hooks/useSendMessage.js +50 -23
  58. package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
  59. package/lib/commonjs/i18n/strings.js +1 -121
  60. package/lib/commonjs/i18n/strings.js.map +1 -1
  61. package/lib/commonjs/main.js +0 -6
  62. package/lib/commonjs/main.js.map +1 -1
  63. package/lib/commonjs/networking/api-requests/user.api.js +0 -59
  64. package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
  65. package/lib/commonjs/networking/outboundQueue.js +18 -0
  66. package/lib/commonjs/networking/outboundQueue.js.map +1 -1
  67. package/lib/commonjs/networking/stanzaHandlers.js +10 -1
  68. package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
  69. package/lib/commonjs/networking/xmppClient.js +107 -7
  70. package/lib/commonjs/networking/xmppClient.js.map +1 -1
  71. package/lib/commonjs/roomStore/chatSettingsSlice.js +1 -3
  72. package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
  73. package/lib/commonjs/roomStore/roomsSlice.js +22 -3
  74. package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
  75. package/lib/module/assets/icons.js +1 -6
  76. package/lib/module/assets/icons.js.map +1 -1
  77. package/lib/module/components/Header/HeaderRoomList.js +6 -20
  78. package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
  79. package/lib/module/components/MainComponents/ChatRoom.js +14 -36
  80. package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
  81. package/lib/module/components/MainComponents/MessageList.js +24 -8
  82. package/lib/module/components/MainComponents/MessageList.js.map +1 -1
  83. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js +13 -14
  84. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  85. package/lib/module/components/MainComponents/RoomList.js +32 -62
  86. package/lib/module/components/MainComponents/RoomList.js.map +1 -1
  87. package/lib/module/components/Menu/HeaderRoomListMenu.js +101 -311
  88. package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
  89. package/lib/module/components/Modals/AttachSheet/AttachSheet.js +113 -311
  90. package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  91. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +217 -555
  92. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  93. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +2 -6
  94. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  95. package/lib/module/components/Modals/Modal/Modal.js +1 -9
  96. package/lib/module/components/Modals/Modal/Modal.js.map +1 -1
  97. package/lib/module/components/Modals/NewChatModal/ModalContent.js +1 -2
  98. package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  99. package/lib/module/components/Modals/NewChatModal/NewChatModal.js +106 -205
  100. package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  101. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js +0 -8
  102. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  103. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +2 -4
  104. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  105. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +23 -9
  106. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  107. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +248 -509
  108. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  109. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +48 -76
  110. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  111. package/lib/module/components/Modals/styledModalComponents.js +2 -9
  112. package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
  113. package/lib/module/components/RoomComponents/ChatRoomItem.js +7 -17
  114. package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
  115. package/lib/module/components/styled/SendInput.js +12 -81
  116. package/lib/module/components/styled/SendInput.js.map +1 -1
  117. package/lib/module/components/styled/StyledComponents.js +3 -9
  118. package/lib/module/components/styled/StyledComponents.js.map +1 -1
  119. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +4 -11
  120. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  121. package/lib/module/context/xmppProvider.js +35 -6
  122. package/lib/module/context/xmppProvider.js.map +1 -1
  123. package/lib/module/helpers/updateMessagesTillLast.js +41 -13
  124. package/lib/module/helpers/updateMessagesTillLast.js.map +1 -1
  125. package/lib/module/hooks/useChatRoomFocus.js +9 -3
  126. package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
  127. package/lib/module/hooks/useLogout.js +5 -0
  128. package/lib/module/hooks/useLogout.js.map +1 -1
  129. package/lib/module/hooks/useSendMessage.js +51 -24
  130. package/lib/module/hooks/useSendMessage.js.map +1 -1
  131. package/lib/module/i18n/strings.js +1 -121
  132. package/lib/module/i18n/strings.js.map +1 -1
  133. package/lib/module/main.js +1 -1
  134. package/lib/module/main.js.map +1 -1
  135. package/lib/module/networking/api-requests/user.api.js +0 -56
  136. package/lib/module/networking/api-requests/user.api.js.map +1 -1
  137. package/lib/module/networking/outboundQueue.js +17 -0
  138. package/lib/module/networking/outboundQueue.js.map +1 -1
  139. package/lib/module/networking/stanzaHandlers.js +10 -1
  140. package/lib/module/networking/stanzaHandlers.js.map +1 -1
  141. package/lib/module/networking/xmppClient.js +107 -7
  142. package/lib/module/networking/xmppClient.js.map +1 -1
  143. package/lib/module/roomStore/chatSettingsSlice.js +1 -3
  144. package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
  145. package/lib/module/roomStore/roomsSlice.js +20 -2
  146. package/lib/module/roomStore/roomsSlice.js.map +1 -1
  147. package/lib/typescript/assets/icons.d.ts +0 -16
  148. package/lib/typescript/assets/icons.d.ts.map +1 -1
  149. package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
  150. package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
  151. package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
  152. package/lib/typescript/components/MainComponents/ProfileImagePlaceholder.d.ts.map +1 -1
  153. package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
  154. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts +0 -3
  155. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
  156. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts +0 -9
  157. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts.map +1 -1
  158. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts +0 -10
  159. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
  160. package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
  161. package/lib/typescript/components/Modals/Modal/Modal.d.ts.map +1 -1
  162. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts +2 -4
  163. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts.map +1 -1
  164. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts +1 -1
  165. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts.map +1 -1
  166. package/lib/typescript/components/Modals/NewChatModal/UpdNewChatModal.d.ts.map +1 -1
  167. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts +1 -6
  168. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts.map +1 -1
  169. package/lib/typescript/components/Modals/UserProfileModal/EditUserModal.d.ts.map +1 -1
  170. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts +0 -16
  171. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
  172. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts +0 -1
  173. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
  174. package/lib/typescript/components/Modals/styledModalComponents.d.ts.map +1 -1
  175. package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
  176. package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
  177. package/lib/typescript/components/styled/StyledComponents.d.ts.map +1 -1
  178. package/lib/typescript/components/styled/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
  179. package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
  180. package/lib/typescript/helpers/updateMessagesTillLast.d.ts.map +1 -1
  181. package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
  182. package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
  183. package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
  184. package/lib/typescript/i18n/strings.d.ts.map +1 -1
  185. package/lib/typescript/main.d.ts +1 -1
  186. package/lib/typescript/main.d.ts.map +1 -1
  187. package/lib/typescript/networking/api-requests/user.api.d.ts +0 -27
  188. package/lib/typescript/networking/api-requests/user.api.d.ts.map +1 -1
  189. package/lib/typescript/networking/outboundQueue.d.ts +16 -0
  190. package/lib/typescript/networking/outboundQueue.d.ts.map +1 -1
  191. package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
  192. package/lib/typescript/networking/xmppClient.d.ts +33 -1
  193. package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
  194. package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
  195. package/lib/typescript/roomStore/roomsSlice.d.ts +18 -1
  196. package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
  197. package/lib/typescript/types/models/room.model.d.ts +15 -0
  198. package/lib/typescript/types/models/room.model.d.ts.map +1 -1
  199. package/lib/typescript/types/types.d.ts +20 -20
  200. package/lib/typescript/types/types.d.ts.map +1 -1
  201. package/package.json +1 -6
  202. package/src/assets/icons.tsx +9 -48
  203. package/src/components/Header/HeaderRoomList.tsx +5 -20
  204. package/src/components/MainComponents/ChatRoom.tsx +20 -38
  205. package/src/components/MainComponents/MessageList.tsx +24 -8
  206. package/src/components/MainComponents/ProfileImagePlaceholder.tsx +14 -21
  207. package/src/components/MainComponents/RoomList.tsx +34 -65
  208. package/src/components/Menu/HeaderRoomListMenu.tsx +71 -310
  209. package/src/components/Modals/AttachSheet/AttachSheet.tsx +97 -331
  210. package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +279 -598
  211. package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +2 -4
  212. package/src/components/Modals/Modal/Modal.tsx +0 -7
  213. package/src/components/Modals/NewChatModal/ModalContent.tsx +3 -6
  214. package/src/components/Modals/NewChatModal/NewChatModal.tsx +117 -219
  215. package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +1 -12
  216. package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +4 -14
  217. package/src/components/Modals/UserProfileModal/EditUserModal.tsx +25 -9
  218. package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +307 -617
  219. package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +58 -75
  220. package/src/components/Modals/styledModalComponents.tsx +2 -9
  221. package/src/components/RoomComponents/ChatRoomItem.tsx +7 -14
  222. package/src/components/styled/SendInput.tsx +12 -83
  223. package/src/components/styled/StyledComponents.ts +3 -9
  224. package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +4 -11
  225. package/src/context/xmppProvider.tsx +41 -8
  226. package/src/helpers/updateMessagesTillLast.tsx +42 -17
  227. package/src/hooks/useChatRoomFocus.ts +11 -3
  228. package/src/hooks/useLogout.tsx +7 -0
  229. package/src/hooks/useSendMessage.tsx +60 -24
  230. package/src/i18n/strings.ts +1 -121
  231. package/src/main.ts +1 -1
  232. package/src/networking/api-requests/user.api.ts +0 -71
  233. package/src/networking/outboundQueue.ts +29 -0
  234. package/src/networking/stanzaHandlers.ts +9 -1
  235. package/src/networking/xmppClient.ts +118 -7
  236. package/src/roomStore/chatSettingsSlice.ts +1 -3
  237. package/src/roomStore/roomsSlice.ts +20 -2
  238. package/src/types/models/room.model.ts +15 -0
  239. package/src/types/types.ts +20 -22
  240. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +0 -226
  241. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +0 -1
  242. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +0 -556
  243. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +0 -1
  244. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +0 -210
  245. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +0 -1
  246. package/lib/commonjs/helpers/getChatBackground.js +0 -23
  247. package/lib/commonjs/helpers/getChatBackground.js.map +0 -1
  248. package/lib/commonjs/helpers/mediaLibraryRuntime.js +0 -31
  249. package/lib/commonjs/helpers/mediaLibraryRuntime.js.map +0 -1
  250. package/lib/commonjs/helpers/pickImageAsset.js +0 -68
  251. package/lib/commonjs/helpers/pickImageAsset.js.map +0 -1
  252. package/lib/commonjs/helpers/sheetGestures.js +0 -32
  253. package/lib/commonjs/helpers/sheetGestures.js.map +0 -1
  254. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +0 -223
  255. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +0 -1
  256. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +0 -548
  257. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +0 -1
  258. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +0 -205
  259. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +0 -1
  260. package/lib/module/helpers/getChatBackground.js +0 -18
  261. package/lib/module/helpers/getChatBackground.js.map +0 -1
  262. package/lib/module/helpers/mediaLibraryRuntime.js +0 -25
  263. package/lib/module/helpers/mediaLibraryRuntime.js.map +0 -1
  264. package/lib/module/helpers/pickImageAsset.js +0 -63
  265. package/lib/module/helpers/pickImageAsset.js.map +0 -1
  266. package/lib/module/helpers/sheetGestures.js +0 -26
  267. package/lib/module/helpers/sheetGestures.js.map +0 -1
  268. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts +0 -9
  269. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +0 -1
  270. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts +0 -75
  271. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts.map +0 -1
  272. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts +0 -25
  273. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts.map +0 -1
  274. package/lib/typescript/helpers/getChatBackground.d.ts +0 -15
  275. package/lib/typescript/helpers/getChatBackground.d.ts.map +0 -1
  276. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts +0 -3
  277. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts.map +0 -1
  278. package/lib/typescript/helpers/pickImageAsset.d.ts +0 -27
  279. package/lib/typescript/helpers/pickImageAsset.d.ts.map +0 -1
  280. package/lib/typescript/helpers/sheetGestures.d.ts +0 -20
  281. package/lib/typescript/helpers/sheetGestures.d.ts.map +0 -1
  282. package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +0 -244
  283. package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +0 -615
  284. package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +0 -217
  285. package/src/helpers/getChatBackground.ts +0 -18
  286. package/src/helpers/mediaLibraryRuntime.ts +0 -25
  287. package/src/helpers/pickImageAsset.ts +0 -68
  288. package/src/helpers/sheetGestures.ts +0 -25
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethora/chat-component-rn",
3
- "version": "26.7.4",
3
+ "version": "26.7.5",
4
4
  "description": "Drop-in XMPP chat component for React Native / Expo. <Chat config={...}/> and you're done.",
5
5
  "main": "index.js",
6
6
  "module": "lib/module/main.js",
@@ -48,7 +48,6 @@
48
48
  "@react-native-async-storage/async-storage": ">=1.21.0",
49
49
  "@react-native-community/netinfo": ">=11.0.0",
50
50
  "expo-audio": ">=1.0.0",
51
- "expo-blur": ">=13.0.0",
52
51
  "expo-clipboard": ">=7.0.0",
53
52
  "expo-document-picker": ">=13.0.0",
54
53
  "expo-file-system": ">=19.0.0",
@@ -94,9 +93,6 @@
94
93
  "expo-audio": {
95
94
  "optional": true
96
95
  },
97
- "expo-blur": {
98
- "optional": true
99
- },
100
96
  "expo-clipboard": {
101
97
  "optional": true
102
98
  },
@@ -171,7 +167,6 @@
171
167
  "eslint-config-expo": "~57.0.1",
172
168
  "expo": "~57.0.0",
173
169
  "expo-audio": "~57.0.3",
174
- "expo-blur": "~57.0.2",
175
170
  "expo-build-properties": "~57.0.10",
176
171
  "expo-clipboard": "~57.0.1",
177
172
  "expo-document-picker": "~57.0.1",
@@ -271,18 +271,18 @@ export const NoMessages = ({
271
271
  </Svg>
272
272
  );
273
273
 
274
- export const ReportIcon = ({ color = '#E53935', ...props }) => (
274
+ export const ReportIcon = ({ color = '#8C8C8C', ...props }) => (
275
275
  <Svg width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
276
276
  <Path
277
277
  d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
278
- stroke={color}
278
+ stroke="#E53935"
279
279
  strokeWidth="1.5"
280
280
  strokeLinecap="round"
281
281
  strokeLinejoin="round"
282
282
  />
283
283
  <Path
284
284
  d="M12 7V13M12 16H12.01"
285
- stroke={color}
285
+ stroke="#E53935"
286
286
  strokeWidth="1.5"
287
287
  strokeLinecap="round"
288
288
  strokeLinejoin="round"
@@ -333,26 +333,6 @@ export const ReplyIcon = ({ color = '#8C8C8C', ...props }) => (
333
333
  </Svg>
334
334
  );
335
335
 
336
- /**
337
- * Classic "share" glyph — three nodes joined by two links — for the
338
- * profile's Share button. `SendItemIcon`, which used to stand in here, is
339
- * a textured item/token badge with a hardcoded blue outline: wrong shape,
340
- * and it ignores the button's tint.
341
- */
342
- export const ShareIcon = ({ color = '#8C8C8C', width = 24, height = 24, ...props }) => (
343
- <Svg width={width} height={height} viewBox="0 0 24 24" fill="none" {...props}>
344
- <Circle cx="18" cy="5" r="3" stroke={color} strokeWidth="2" />
345
- <Circle cx="6" cy="12" r="3" stroke={color} strokeWidth="2" />
346
- <Circle cx="18" cy="19" r="3" stroke={color} strokeWidth="2" />
347
- <Path
348
- d="M8.59 13.51L15.42 17.49M15.41 6.51L8.59 10.49"
349
- stroke={color}
350
- strokeWidth="2"
351
- strokeLinecap="round"
352
- />
353
- </Svg>
354
- );
355
-
356
336
  export const SendItemIcon = ({ color = '#8C8C8C', ...props }) => (
357
337
  <Svg width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
358
338
  <Path
@@ -457,18 +437,18 @@ export const BurgerMenuIcon = ({ color = '#fff', ...props }) => (
457
437
  </Svg>
458
438
  );
459
439
 
460
- export const LeaveIcon = ({ color = '#E53935', ...props }) => (
440
+ export const LeaveIcon = ({ color = '#fff', ...props }) => (
461
441
  <Svg width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
462
442
  <Path
463
443
  d="M14 8V6C14 5.46957 13.7893 4.96086 13.4142 4.58579C13.0391 4.21071 12.5304 4 12 4H5C4.46957 4 3.96086 4.21071 3.58579 4.58579C3.21071 4.96086 3 5.46957 3 6V18C3 18.5304 3.21071 19.0391 3.58579 19.4142C3.96086 19.7893 4.46957 20 5 20H12C12.5304 20 13.0391 19.7893 13.4142 19.4142C13.7893 19.0391 14 18.5304 14 18V16"
464
- stroke={color}
444
+ stroke="#E53935"
465
445
  strokeWidth="2"
466
446
  strokeLinecap="round"
467
447
  strokeLinejoin="round"
468
448
  />
469
449
  <Path
470
450
  d="M9 12H21M21 12L18 9M21 12L18 15"
471
- stroke={color}
451
+ stroke="#E53935"
472
452
  strokeWidth="2"
473
453
  strokeLinecap="round"
474
454
  strokeLinejoin="round"
@@ -476,12 +456,12 @@ export const LeaveIcon = ({ color = '#E53935', ...props }) => (
476
456
  </Svg>
477
457
  );
478
458
 
479
- export const BackIcon = ({ color = '#8C8C8C', ...props }) => (
459
+ export const BackIcon = ({ color = '#fff', ...props }) => (
480
460
  <Svg width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
481
- <Path d="M5 12H19H5ZM5 12L9 8L5 12ZM5 12L9 16L5 12Z" fill={color} />
461
+ <Path d="M5 12H19H5ZM5 12L9 8L5 12ZM5 12L9 16L5 12Z" fill="#8C8C8C" />
482
462
  <Path
483
463
  d="M5 12H19M5 12L9 8M5 12L9 16"
484
- stroke={color}
464
+ stroke="#8C8C8C"
485
465
  strokeWidth="2"
486
466
  strokeLinecap="round"
487
467
  strokeLinejoin="round"
@@ -598,25 +578,6 @@ export const SettingIcon = ({ color = '#8C8C8C', ...props }) => (
598
578
  </Svg>
599
579
  );
600
580
 
601
- export const LogoutIcon = ({ color = '#8C8C8C', ...props }) => (
602
- <Svg width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}>
603
- <Path
604
- d="M15 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H15"
605
- stroke={color}
606
- strokeWidth="2"
607
- strokeLinecap="round"
608
- strokeLinejoin="round"
609
- />
610
- <Path
611
- d="M10 8L14 12L10 16M14 12H4"
612
- stroke={color}
613
- strokeWidth="2"
614
- strokeLinecap="round"
615
- strokeLinejoin="round"
616
- />
617
- </Svg>
618
- );
619
-
620
581
  export const FileIcon = ({ width = 46, height = 46, ...props }) => (
621
582
  <Svg width={width} height={height} viewBox="0 0 40 40" fill="none">
622
583
  <Rect width="40" height="40" rx="8" fill="#F2E6F6" />
@@ -38,16 +38,11 @@ export const HeaderRoomList: FC<HeaderRoomListProps> = ({ setDrawerOpen }) => {
38
38
  {!config?.disableRoomMenu && config?.headerMenu ? (
39
39
  <View style={styles.leftContainer}>
40
40
  <Button
41
- testID="room-list-burger"
42
41
  style={styles.menuButton}
43
42
  color="black"
44
43
  unstyled
45
44
  EndIcon={<BurgerMenuIcon color={config?.colors?.primary} />}
46
- onPress={() =>
47
- typeof config?.headerMenu === 'function'
48
- ? config.headerMenu()
49
- : setDrawerOpen()
50
- }
45
+ onPress={() => config?.headerMenu && config?.headerMenu()}
51
46
  />
52
47
  </View>
53
48
  ) : (
@@ -64,7 +59,7 @@ export const HeaderRoomList: FC<HeaderRoomListProps> = ({ setDrawerOpen }) => {
64
59
  <ProfileImagePlaceholder
65
60
  icon={modalUser?.profileImage ?? null}
66
61
  name={modalUser?.name ?? modalUser?.firstName}
67
- size={36}
62
+ size={30}
68
63
  click={{
69
64
  isClick: true,
70
65
  onPress: setDrawerOpen,
@@ -81,19 +76,9 @@ const styles = StyleSheet.create({
81
76
  alignItems: 'center',
82
77
  paddingHorizontal: 16,
83
78
  paddingTop: 16,
84
- paddingBottom: 12,
79
+ paddingBottom: 8,
85
80
  minHeight: 56,
86
81
  justifyContent: 'space-between',
87
- backgroundColor: '#FFFFFF',
88
- borderBottomLeftRadius: 20,
89
- borderBottomRightRadius: 20,
90
- // Lifts the header off the page ground behind it.
91
- shadowColor: '#101828',
92
- shadowOffset: { width: 0, height: 4 },
93
- shadowOpacity: 0.06,
94
- shadowRadius: 12,
95
- elevation: 4,
96
- zIndex: 2,
97
82
  },
98
83
  menuButton: {
99
84
  padding: 8,
@@ -101,7 +86,7 @@ const styles = StyleSheet.create({
101
86
  backgroundColor: 'transparent',
102
87
  },
103
88
  leftContainer: {
104
- width: 44,
89
+ width: 40,
105
90
  alignItems: 'flex-start',
106
91
  justifyContent: 'center',
107
92
  },
@@ -113,7 +98,7 @@ const styles = StyleSheet.create({
113
98
  justifyContent: 'center',
114
99
  },
115
100
  rightContainer: {
116
- width: 44,
101
+ width: 40,
117
102
  alignItems: 'flex-end',
118
103
  justifyContent: 'center',
119
104
  },
@@ -20,7 +20,6 @@ import NewChatModal from '../Modals/NewChatModal/NewChatModal';
20
20
  import { EditWrapper } from './EditWrapper';
21
21
  import { EmptyChatIllustration } from '../../assets/EmptyChatIllustration';
22
22
  import { getIconColor } from '../../helpers/getIconColor';
23
- import { getChatBackgroundColor } from '../../helpers/getChatBackground';
24
23
  import { ChooseChatMessage } from './ChooseChatMessage';
25
24
  import { useRoomUrl } from '../../hooks/useRoomUrl';
26
25
  import { useSendMessage } from '../../hooks/useSendMessage';
@@ -216,25 +215,30 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
216
215
  // Tracks what the user actually saw: `null` while they're at the
217
216
  // bottom (safe to mark everything read), or the timestamp of the
218
217
  // newest message visible when they scrolled away from it. Reported
219
- // by MessageList via onReadBoundaryChange. Without this, leaving a
218
+ // published by MessageList into the store. Without this, leaving a
220
219
  // room (or backgrounding) while scrolled up stamped `now()` as read
221
220
  // and silently discarded genuinely-unread messages. Customer-
222
221
  // reported #33.
223
- const readBoundaryRef = useRef<number | null>(null);
224
- const handleReadBoundaryChange = useCallback((boundaryTs: number | null) => {
225
- readBoundaryRef.current = boundaryTs;
226
- }, []);
222
+ // MessageList publishes the boundary straight into the store, so the
223
+ // cleanup below reads it from there rather than keeping a second copy
224
+ // in a ref — the out-of-component paths (AppState background, the
225
+ // `isVisible` signal, useChatRoomFocus, logout) read the same field.
226
+ const getReadBoundary = useCallback(
227
+ (jid: string): number | null =>
228
+ store.getState().rooms?.rooms?.[jid]?.readBoundaryTs ?? null,
229
+ []
230
+ );
227
231
 
228
232
  useEffect(() => {
229
233
  if (!activeRoomJID) {
230
234
  return;
231
235
  }
232
236
 
233
- readBoundaryRef.current = null;
234
237
  dispatch(setVisibleRoom({ roomJID: activeRoomJID }));
235
238
  setIsLoadingMore(false);
236
239
  return () => {
237
- const timestamp = readBoundaryRef.current ?? new Date().getTime();
240
+ const boundaryTs = getReadBoundary(activeRoomJID);
241
+ const timestamp = boundaryTs ?? new Date().getTime();
238
242
  dispatch(
239
243
  setLastViewedTimestamp({
240
244
  chatJID: activeRoomJID,
@@ -252,7 +256,7 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
252
256
  // room, so messages the user never scrolled down to come
253
257
  // back as read on the next login — the local count was
254
258
  // right but the server overrode it.
255
- visibleRoomTs: readBoundaryRef.current,
259
+ visibleRoomTs: boundaryTs,
256
260
  })
257
261
  .catch(() => {});
258
262
  }
@@ -341,20 +345,7 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
341
345
  ? KeyboardStickyView
342
346
  : View;
343
347
  const inputDockProps: any = {
344
- // The dock carries the composer's white surface all the way to the
345
- // bottom edge, so it needs the same rounded top and upward shadow —
346
- // a square white block behind a rounded composer just hid the corners.
347
- style: {
348
- paddingBottom: inputDockPaddingBottom,
349
- backgroundColor: '#fff',
350
- borderTopLeftRadius: 20,
351
- borderTopRightRadius: 20,
352
- shadowColor: '#101828',
353
- shadowOffset: { width: 0, height: -4 },
354
- shadowOpacity: 0.06,
355
- shadowRadius: 12,
356
- elevation: 8,
357
- },
348
+ style: { paddingBottom: inputDockPaddingBottom, backgroundColor: '#fff' },
358
349
  ...(stickyInput
359
350
  ? { offset: { closed: 0, opened: keyboardVerticalOffset } }
360
351
  : {}),
@@ -363,15 +354,11 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
363
354
  return (
364
355
  <KeyboardWrapper {...keyboardWrapperProps}>
365
356
  <ChatContainer
366
- // The conversation's own colour, not white: the header's rounded
367
- // bottom corners and the composer's rounded top corners reveal
368
- // THIS view, so a white parent made both look square.
369
- style={[
370
- { backgroundColor: getChatBackgroundColor(configWithEventHandlers) },
371
- configWithEventHandlers?.chatRoomStyles as
372
- | import('react-native').ViewStyle
373
- | undefined,
374
- ]}
357
+ style={
358
+ configWithEventHandlers?.chatRoomStyles
359
+ ? (configWithEventHandlers.chatRoomStyles as import('react-native').ViewStyle)
360
+ : undefined
361
+ }
375
362
  >
376
363
  {!configWithEventHandlers?.disableHeader && (
377
364
  <ChatHeader
@@ -410,11 +397,7 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
410
397
  flex: 1,
411
398
  justifyContent: 'center',
412
399
  alignItems: 'center',
413
- // Empty rooms used to flip to white, which broke the
414
- // header's rounded corners in exactly the same way.
415
- backgroundColor: getChatBackgroundColor(
416
- configWithEventHandlers
417
- ),
400
+ backgroundColor: '#ffffff',
418
401
  }}
419
402
  >
420
403
  <NoMessagesPlaceholder />
@@ -487,7 +470,6 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
487
470
  config={configWithEventHandlers}
488
471
  loading={isLoadingMore}
489
472
  isReply={false}
490
- onReadBoundaryChange={handleReadBoundaryChange}
491
473
  />
492
474
  )}
493
475
  </View>
@@ -18,8 +18,9 @@ import {
18
18
  TouchableOpacity,
19
19
  ImageSourcePropType,
20
20
  } from 'react-native';
21
+ import { useDispatch } from 'react-redux';
21
22
  import { IMessage, User, IConfig, IRoom } from '../../types/types';
22
- import { msgSortableMs } from '../../roomStore/roomsSlice';
23
+ import { msgSortableMs, setReadBoundary } from '../../roomStore/roomsSlice';
23
24
  import Composing from '../styled/StyledInputComponents/Composing';
24
25
  import TreadLabel from '../styled/TreadLabel';
25
26
  import { MessageContainer } from './MessageContainer';
@@ -28,7 +29,6 @@ import Loader from '../styled/Loader';
28
29
  import { ArowDownIcon } from '../../assets/icons';
29
30
  import CustomTypingIndicator from '../styled/StyledInputComponents/CustomTypingIndicator';
30
31
  import { getIconColor } from '../../helpers/getIconColor';
31
- import { getChatBackgroundColor } from '../../helpers/getChatBackground';
32
32
 
33
33
  interface MessageListProps<TMessage extends IMessage> {
34
34
  CustomMessage?: React.ComponentType<{
@@ -78,6 +78,7 @@ const MessageList = <TMessage extends IMessage>({
78
78
  activeMessage,
79
79
  onReadBoundaryChange,
80
80
  }: MessageListProps<TMessage>) => {
81
+ const dispatch = useDispatch();
81
82
  const { composing, messages, composingList } = useRoomState(roomJID)
82
83
  .room! as IRoom;
83
84
  const [isUserAtBottom, setIsUserAtBottom] = useState(true);
@@ -103,6 +104,21 @@ const MessageList = <TMessage extends IMessage>({
103
104
 
104
105
  const flatListRef = useRef<FlatList<IMessage>>(null);
105
106
 
107
+ // Single writer for the read boundary. Publishes to the store (so the
108
+ // out-of-component paths that mark a room read — AppState background,
109
+ // the `isVisible` signal, the visible-room auto-advance, focus hooks,
110
+ // logout — can stamp what the user actually saw) AND to the optional
111
+ // host callback. Customer-reported #33.
112
+ const reportReadBoundary = useCallback(
113
+ (boundaryTs: number | null) => {
114
+ if (roomJID) {
115
+ dispatch(setReadBoundary({ chatJID: roomJID, boundaryTs }));
116
+ }
117
+ onReadBoundaryChange?.(boundaryTs);
118
+ },
119
+ [dispatch, roomJID, onReadBoundaryChange]
120
+ );
121
+
106
122
  const addReplyMessages = useMemo(() => {
107
123
  return messages.map((message: IMessage) => {
108
124
  const newMessage = {
@@ -343,7 +359,7 @@ const MessageList = <TMessage extends IMessage>({
343
359
  // counter so the badge disappears with the arrow.
344
360
  setUnreadWhileScrolledUp(0);
345
361
  newestSeenTsRef.current = null;
346
- onReadBoundaryChange?.(null);
362
+ reportReadBoundary(null);
347
363
  } else {
348
364
  isUserAtBottomRef.current = false;
349
365
  if (hasUserScrolledRef.current) {
@@ -361,12 +377,12 @@ const MessageList = <TMessage extends IMessage>({
361
377
  },
362
378
  0
363
379
  );
364
- onReadBoundaryChange?.(newestSeenTsRef.current);
380
+ reportReadBoundary(newestSeenTsRef.current);
365
381
  }
366
382
  setIsUserAtBottom(false);
367
383
  }
368
384
  },
369
- [memoizedMessages, onReadBoundaryChange]
385
+ [memoizedMessages, reportReadBoundary]
370
386
  );
371
387
 
372
388
  // Keep the badge in sync with messages that arrive while the user is
@@ -395,7 +411,7 @@ const MessageList = <TMessage extends IMessage>({
395
411
  setIsUserAtBottom(true);
396
412
  setUnreadWhileScrolledUp(0);
397
413
  newestSeenTsRef.current = null;
398
- onReadBoundaryChange?.(null);
414
+ reportReadBoundary(null);
399
415
  scrollToBottom();
400
416
  };
401
417
 
@@ -406,7 +422,7 @@ const MessageList = <TMessage extends IMessage>({
406
422
  setIsUserAtBottom(true);
407
423
  setUnreadWhileScrolledUp(0);
408
424
  newestSeenTsRef.current = null;
409
- onReadBoundaryChange?.(null);
425
+ reportReadBoundary(null);
410
426
  // eslint-disable-next-line react-hooks/exhaustive-deps
411
427
  }, [roomJID]);
412
428
 
@@ -429,7 +445,7 @@ const MessageList = <TMessage extends IMessage>({
429
445
  <View
430
446
  style={[
431
447
  styles.container,
432
- { backgroundColor: getChatBackgroundColor(config) },
448
+ { backgroundColor: config?.backgroundChat?.color || '#F3F6FC' },
433
449
  ]}
434
450
  >
435
451
  <View style={styles.backgroundImageContainer}>{BackgroundImage}</View>
@@ -69,27 +69,27 @@ export const ProfileImagePlaceholder: React.FC<
69
69
  if (words.length === 0) {return '';}
70
70
 
71
71
  if (words.length >= 2) {
72
- const firstLetter = /^[\p{L}\p{N}]$/u.test(words[0]?.[0] || '')
72
+ const firstLetter = /^[a-zA-Zа-яА-ЯёЁ]$/.test(words[0]?.[0] || '')
73
73
  ? words[0][0].toUpperCase()
74
74
  : '';
75
- const secondLetter = /^[\p{L}\p{N}]$/u.test(words[1]?.[0] || '')
75
+ const secondLetter = /^[a-zA-Zа-яА-ЯёЁ]$/.test(words[1]?.[0] || '')
76
76
  ? words[1][0].toUpperCase()
77
77
  : '';
78
78
  return firstLetter + secondLetter;
79
79
  }
80
80
 
81
81
  if (words.length === 1 && words[0].length >= 2) {
82
- const firstLetter = /^[\p{L}\p{N}]$/u.test(words[0][0] || '')
82
+ const firstLetter = /^[a-zA-Zа-яА-ЯёЁ]$/.test(words[0][0] || '')
83
83
  ? words[0][0].toUpperCase()
84
84
  : '';
85
- const secondLetter = /^[\p{L}\p{N}]$/u.test(words[0][1] || '')
85
+ const secondLetter = /^[a-zA-Zа-яА-ЯёЁ]$/.test(words[0][1] || '')
86
86
  ? words[0][1].toUpperCase()
87
87
  : '';
88
88
  return firstLetter + secondLetter;
89
89
  }
90
90
 
91
91
  if (words.length === 1 && words[0].length === 1) {
92
- return /^[\p{L}\p{N}]$/u.test(words[0][0] || '')
92
+ return /^[a-zA-Zа-яА-ЯёЁ]$/.test(words[0][0] || '')
93
93
  ? words[0][0].toUpperCase()
94
94
  : '';
95
95
  }
@@ -97,26 +97,16 @@ export const ProfileImagePlaceholder: React.FC<
97
97
  return '';
98
98
  };
99
99
 
100
- const getInitials = () =>
101
- !imageSource && name ? getTwoUppercaseLetters(name) : '';
102
-
103
- const imageSource =
104
- typeof icon === 'string' && icon
105
- ? { uri: icon }
106
- : typeof icon === 'number'
107
- ? icon
108
- : icon && typeof (icon as any).uri === 'string' && (icon as any).uri
109
- ? (icon as any)
110
- : null;
100
+ const getInitials = () => (!icon && name ? getTwoUppercaseLetters(name) : '');
111
101
 
112
102
  return (
113
103
  <Wrapper
114
- bgColor={imageSource ? 'transparent' : backgroundColor?.backgroundColor}
104
+ bgColor={icon ? 'transparent' : backgroundColor?.backgroundColor}
115
105
  size={size}
116
106
  isClickable={active || !!upload?.active}
117
107
  >
118
108
  <AvatarCircle
119
- bgColor={imageSource ? 'transparent' : backgroundColor?.backgroundColor}
109
+ bgColor={icon ? 'transparent' : backgroundColor?.backgroundColor}
120
110
  size={size}
121
111
  isClickable={active || !!upload?.active}
122
112
  onPress={
@@ -127,8 +117,11 @@ export const ProfileImagePlaceholder: React.FC<
127
117
  : undefined
128
118
  }
129
119
  >
130
- {imageSource ? (
131
- <AvatarImage source={imageSource} size={size} />
120
+ {icon ? (
121
+ <AvatarImage
122
+ source={typeof icon === 'string' ? { uri: icon } : icon as any}
123
+ size={size}
124
+ />
132
125
  ) : placeholderIcon ? (
133
126
  placeholderIcon
134
127
  ) : (
@@ -147,7 +140,7 @@ export const ProfileImagePlaceholder: React.FC<
147
140
  </Overlay>
148
141
  )}
149
142
  </AvatarCircle>
150
- {remove?.enabled && imageSource && role !== 'participant' && (
143
+ {remove?.enabled && icon && role !== 'participant' && (
151
144
  <RemoveButton onPress={remove.onRemoveClick}>
152
145
  <RemoveButtonText>&times;</RemoveButtonText>
153
146
  </RemoveButton>
@@ -35,14 +35,6 @@ interface RoomListProps {
35
35
  onRoomClick?: (chat: IRoom) => void;
36
36
  }
37
37
 
38
- /** Page ground behind the room list, the search field and the header's
39
- * rounded bottom corners. */
40
- const LIST_BACKGROUND = '#E8EDF2';
41
-
42
- /** First-paint fallback until the floating search strip reports its real
43
- * height; the list's top padding follows the measurement after that. */
44
- const SEARCH_BAR_ESTIMATE = 60;
45
-
46
38
  const RoomList: React.FC<RoomListProps> = ({
47
39
  chats,
48
40
  burgerMenu = false,
@@ -128,10 +120,6 @@ const RoomList: React.FC<RoomListProps> = ({
128
120
  }
129
121
  }, [burgerMenu]);
130
122
 
131
- // Measured, so the list's top padding always matches the floating
132
- // search strip — including when a larger font or a taller field grows it.
133
- const [searchBarHeight, setSearchBarHeight] = useState(SEARCH_BAR_ESTIMATE);
134
-
135
123
  const toggleDrawer = () => {
136
124
  if (isDrawerOpen) {
137
125
  closeDrawer();
@@ -192,50 +180,39 @@ const RoomList: React.FC<RoomListProps> = ({
192
180
  <>
193
181
  <View style={styles.scrollContainer}>
194
182
  <HeaderRoomList setDrawerOpen={toggleDrawer} />
195
- {/* The search field floats OVER the list rather than
196
- sitting above it in the column: its strip is transparent
197
- and the rooms scroll underneath, which is what the design
198
- shows. It is still fixed (not a ListHeaderComponent), so
199
- it stays reachable however far the list is scrolled — as a
200
- list header it scrolled away behind the opaque header. */}
201
- <View style={styles.listArea}>
202
- <FlatList
203
- data={filteredChats}
204
- keyExtractor={(item) => item.jid}
205
- // Clears the floating field on first paint; scrolling
206
- // then slides the rooms under it.
207
- contentContainerStyle={{ paddingTop: searchBarHeight }}
208
- renderItem={({ item }) => (
209
- <Pressable
210
- // Stable testID so e2e drivers can target a room
211
- // row by its jid local-part (e.g. Main chat under
212
- // app id `..._...759` → testID `room-...759`).
213
- testID={`room-${(item.jid || '').split('@')[0]}`}
214
- accessibilityLabel={`room-${item.title || item.name}`}
215
- onPress={() => performClick(item)}
216
- onPressIn={handlePressIn}
217
- onPressOut={handlePressOut}
218
- >
219
- <ChatRoomItem chat={item} config={config} />
220
- </Pressable>
221
- )}
222
- style={styles.chatList}
183
+ {/* Search sits ABOVE the list rather than in its
184
+ ListHeaderComponent. As a list header it was simply the
185
+ first scrolling row, so the moment you scrolled the rooms
186
+ it slid up and disappeared behind the opaque header band.
187
+ Fixed here it stays reachable, which is the entire point
188
+ of a search field over a long list. */}
189
+ <View style={styles.searchBar}>
190
+ <SearchInput
191
+ icon={<SearchIcon height={20} />}
192
+ value={searchTerm}
193
+ onChangeText={handleSearchChange}
194
+ placeholder={t('search.placeholder')}
223
195
  />
224
- <View
225
- testID="room-list-search"
226
- style={styles.searchBar}
227
- onLayout={(e) =>
228
- setSearchBarHeight(e.nativeEvent.layout.height)
229
- }
230
- >
231
- <SearchInput
232
- icon={<SearchIcon height={20} />}
233
- value={searchTerm}
234
- onChangeText={handleSearchChange}
235
- placeholder={t('search.placeholder')}
236
- />
237
- </View>
238
196
  </View>
197
+ <FlatList
198
+ data={filteredChats}
199
+ keyExtractor={(item) => item.jid}
200
+ renderItem={({ item }) => (
201
+ <Pressable
202
+ // Stable testID so e2e drivers can target a room
203
+ // row by its jid local-part (e.g. Main chat under
204
+ // app id `..._...759` → testID `room-...759`).
205
+ testID={`room-${(item.jid || '').split('@')[0]}`}
206
+ accessibilityLabel={`room-${item.title || item.name}`}
207
+ onPress={() => performClick(item)}
208
+ onPressIn={handlePressIn}
209
+ onPressOut={handlePressOut}
210
+ >
211
+ <ChatRoomItem chat={item} config={config} />
212
+ </Pressable>
213
+ )}
214
+ style={styles.chatList}
215
+ />
239
216
 
240
217
  <HeaderRoomListMenu
241
218
  closeDrawer={closeDrawer}
@@ -261,7 +238,7 @@ const styles = StyleSheet.create({
261
238
  width: '100%',
262
239
  height: '100%',
263
240
  flex: 1,
264
- backgroundColor: LIST_BACKGROUND,
241
+ backgroundColor: '#fff',
265
242
  },
266
243
  scrollContainer: {
267
244
  flexGrow: 1,
@@ -272,9 +249,6 @@ const styles = StyleSheet.create({
272
249
  padding: 16,
273
250
  justifyContent: 'space-between',
274
251
  },
275
- listArea: {
276
- flex: 1,
277
- },
278
252
  searchBar: {
279
253
  // `row` matters: SearchInputWrapper is `flex: 1` plus a fixed 44px
280
254
  // height. In a column parent that flex resolves VERTICALLY against a
@@ -282,19 +256,14 @@ const styles = StyleSheet.create({
282
256
  // but its magnifier. As a row it resolves to width, which is what it
283
257
  // meant back when the field was a list-header child.
284
258
  flexDirection: 'row',
285
- position: 'absolute',
286
- top: 0,
287
- left: 0,
288
- right: 0,
289
259
  paddingTop: 8,
290
- paddingBottom: 8,
291
260
  paddingHorizontal: 16,
292
- backgroundColor: 'transparent',
261
+ backgroundColor: '#FAFAFA',
293
262
  },
294
263
  chatList: {
295
264
  flex: 1,
296
265
  paddingHorizontal: 16,
297
- backgroundColor: LIST_BACKGROUND,
266
+ backgroundColor: '#FAFAFA',
298
267
  },
299
268
  });
300
269