@ethora/chat-component-rn 26.7.5 → 26.7.7

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 (340) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +31 -8
  3. package/lib/commonjs/assets/icons.js +7 -2
  4. package/lib/commonjs/assets/icons.js.map +1 -1
  5. package/lib/commonjs/components/Header/HeaderRoomList.js +26 -7
  6. package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
  7. package/lib/commonjs/components/MainComponents/ChatHeader.js +5 -2
  8. package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
  9. package/lib/commonjs/components/MainComponents/ChatRoom.js +36 -14
  10. package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
  11. package/lib/commonjs/components/MainComponents/ChatWrapper.js +2 -0
  12. package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
  13. package/lib/commonjs/components/MainComponents/MessageList.js +7 -23
  14. package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
  15. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js +14 -13
  16. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  17. package/lib/commonjs/components/MainComponents/RoomList.js +208 -35
  18. package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
  19. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +317 -98
  20. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
  21. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +320 -110
  22. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  23. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +552 -213
  24. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  25. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +226 -0
  26. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
  27. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +6 -2
  28. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  29. package/lib/commonjs/components/Modals/Modal/Modal.js +8 -0
  30. package/lib/commonjs/components/Modals/Modal/Modal.js.map +1 -1
  31. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js +2 -1
  32. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  33. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +202 -104
  34. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  35. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
  36. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  37. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +556 -0
  38. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
  39. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +210 -0
  40. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
  41. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
  42. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  43. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +7 -21
  44. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  45. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +507 -244
  46. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  47. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +74 -46
  48. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  49. package/lib/commonjs/components/Modals/styledModalComponents.js +9 -2
  50. package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
  51. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +17 -7
  52. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
  53. package/lib/commonjs/components/styled/SendInput.js +80 -11
  54. package/lib/commonjs/components/styled/SendInput.js.map +1 -1
  55. package/lib/commonjs/components/styled/StyledComponents.js +9 -3
  56. package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
  57. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
  58. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  59. package/lib/commonjs/context/xmppProvider.js +32 -39
  60. package/lib/commonjs/context/xmppProvider.js.map +1 -1
  61. package/lib/commonjs/helpers/getChatBackground.js +23 -0
  62. package/lib/commonjs/helpers/getChatBackground.js.map +1 -0
  63. package/lib/commonjs/helpers/mediaLibraryRuntime.js +31 -0
  64. package/lib/commonjs/helpers/mediaLibraryRuntime.js.map +1 -0
  65. package/lib/commonjs/helpers/pickImageAsset.js +68 -0
  66. package/lib/commonjs/helpers/pickImageAsset.js.map +1 -0
  67. package/lib/commonjs/helpers/pushPayload.js +71 -0
  68. package/lib/commonjs/helpers/pushPayload.js.map +1 -0
  69. package/lib/commonjs/helpers/sheetGestures.js +32 -0
  70. package/lib/commonjs/helpers/sheetGestures.js.map +1 -0
  71. package/lib/commonjs/helpers/updateMessagesTillLast.js +12 -40
  72. package/lib/commonjs/helpers/updateMessagesTillLast.js.map +1 -1
  73. package/lib/commonjs/hooks/useChatRoomFocus.js +3 -9
  74. package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
  75. package/lib/commonjs/hooks/useLogout.js +0 -5
  76. package/lib/commonjs/hooks/useLogout.js.map +1 -1
  77. package/lib/commonjs/hooks/usePendingNotification.js +8 -11
  78. package/lib/commonjs/hooks/usePendingNotification.js.map +1 -1
  79. package/lib/commonjs/hooks/useSendMessage.js +23 -50
  80. package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
  81. package/lib/commonjs/i18n/strings.js +121 -1
  82. package/lib/commonjs/i18n/strings.js.map +1 -1
  83. package/lib/commonjs/main.js +19 -0
  84. package/lib/commonjs/main.js.map +1 -1
  85. package/lib/commonjs/networking/api-requests/user.api.js +59 -0
  86. package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
  87. package/lib/commonjs/networking/authRefresh.js +12 -2
  88. package/lib/commonjs/networking/authRefresh.js.map +1 -1
  89. package/lib/commonjs/networking/outboundQueue.js +0 -18
  90. package/lib/commonjs/networking/outboundQueue.js.map +1 -1
  91. package/lib/commonjs/networking/stanzaHandlers.js +1 -10
  92. package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
  93. package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js +8 -1
  94. package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
  95. package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
  96. package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
  97. package/lib/commonjs/networking/xmppClient.js +62 -108
  98. package/lib/commonjs/networking/xmppClient.js.map +1 -1
  99. package/lib/commonjs/roomStore/chatSettingsSlice.js +3 -1
  100. package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
  101. package/lib/commonjs/roomStore/roomsSlice.js +3 -22
  102. package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
  103. package/lib/commonjs/services/pushSubscriptionService.js +15 -13
  104. package/lib/commonjs/services/pushSubscriptionService.js.map +1 -1
  105. package/lib/module/assets/icons.js +6 -1
  106. package/lib/module/assets/icons.js.map +1 -1
  107. package/lib/module/components/Header/HeaderRoomList.js +26 -7
  108. package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
  109. package/lib/module/components/MainComponents/ChatHeader.js +5 -2
  110. package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
  111. package/lib/module/components/MainComponents/ChatRoom.js +36 -14
  112. package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
  113. package/lib/module/components/MainComponents/ChatWrapper.js +2 -0
  114. package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
  115. package/lib/module/components/MainComponents/MessageList.js +8 -24
  116. package/lib/module/components/MainComponents/MessageList.js.map +1 -1
  117. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js +14 -13
  118. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  119. package/lib/module/components/MainComponents/RoomList.js +207 -35
  120. package/lib/module/components/MainComponents/RoomList.js.map +1 -1
  121. package/lib/module/components/Menu/HeaderRoomListMenu.js +319 -101
  122. package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
  123. package/lib/module/components/Modals/AttachSheet/AttachSheet.js +311 -113
  124. package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  125. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +555 -217
  126. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  127. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +223 -0
  128. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
  129. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +6 -2
  130. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  131. package/lib/module/components/Modals/Modal/Modal.js +9 -1
  132. package/lib/module/components/Modals/Modal/Modal.js.map +1 -1
  133. package/lib/module/components/Modals/NewChatModal/ModalContent.js +2 -1
  134. package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  135. package/lib/module/components/Modals/NewChatModal/NewChatModal.js +205 -106
  136. package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  137. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
  138. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  139. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +548 -0
  140. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
  141. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +205 -0
  142. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
  143. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
  144. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  145. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +9 -23
  146. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  147. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +509 -248
  148. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  149. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +76 -48
  150. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  151. package/lib/module/components/Modals/styledModalComponents.js +9 -2
  152. package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
  153. package/lib/module/components/RoomComponents/ChatRoomItem.js +17 -7
  154. package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
  155. package/lib/module/components/styled/SendInput.js +81 -12
  156. package/lib/module/components/styled/SendInput.js.map +1 -1
  157. package/lib/module/components/styled/StyledComponents.js +9 -3
  158. package/lib/module/components/styled/StyledComponents.js.map +1 -1
  159. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
  160. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  161. package/lib/module/context/xmppProvider.js +32 -39
  162. package/lib/module/context/xmppProvider.js.map +1 -1
  163. package/lib/module/helpers/getChatBackground.js +18 -0
  164. package/lib/module/helpers/getChatBackground.js.map +1 -0
  165. package/lib/module/helpers/mediaLibraryRuntime.js +25 -0
  166. package/lib/module/helpers/mediaLibraryRuntime.js.map +1 -0
  167. package/lib/module/helpers/pickImageAsset.js +63 -0
  168. package/lib/module/helpers/pickImageAsset.js.map +1 -0
  169. package/lib/module/helpers/pushPayload.js +63 -0
  170. package/lib/module/helpers/pushPayload.js.map +1 -0
  171. package/lib/module/helpers/sheetGestures.js +26 -0
  172. package/lib/module/helpers/sheetGestures.js.map +1 -0
  173. package/lib/module/helpers/updateMessagesTillLast.js +13 -41
  174. package/lib/module/helpers/updateMessagesTillLast.js.map +1 -1
  175. package/lib/module/hooks/useChatRoomFocus.js +3 -9
  176. package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
  177. package/lib/module/hooks/useLogout.js +0 -5
  178. package/lib/module/hooks/useLogout.js.map +1 -1
  179. package/lib/module/hooks/usePendingNotification.js +8 -11
  180. package/lib/module/hooks/usePendingNotification.js.map +1 -1
  181. package/lib/module/hooks/useSendMessage.js +24 -51
  182. package/lib/module/hooks/useSendMessage.js.map +1 -1
  183. package/lib/module/i18n/strings.js +121 -1
  184. package/lib/module/i18n/strings.js.map +1 -1
  185. package/lib/module/main.js +2 -1
  186. package/lib/module/main.js.map +1 -1
  187. package/lib/module/networking/api-requests/user.api.js +56 -0
  188. package/lib/module/networking/api-requests/user.api.js.map +1 -1
  189. package/lib/module/networking/authRefresh.js +12 -2
  190. package/lib/module/networking/authRefresh.js.map +1 -1
  191. package/lib/module/networking/outboundQueue.js +0 -17
  192. package/lib/module/networking/outboundQueue.js.map +1 -1
  193. package/lib/module/networking/stanzaHandlers.js +1 -10
  194. package/lib/module/networking/stanzaHandlers.js.map +1 -1
  195. package/lib/module/networking/xmpp/presenceInRoom.xmpp.js +8 -1
  196. package/lib/module/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
  197. package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
  198. package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
  199. package/lib/module/networking/xmppClient.js +62 -108
  200. package/lib/module/networking/xmppClient.js.map +1 -1
  201. package/lib/module/roomStore/chatSettingsSlice.js +3 -1
  202. package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
  203. package/lib/module/roomStore/roomsSlice.js +2 -20
  204. package/lib/module/roomStore/roomsSlice.js.map +1 -1
  205. package/lib/module/services/pushSubscriptionService.js +15 -13
  206. package/lib/module/services/pushSubscriptionService.js.map +1 -1
  207. package/lib/typescript/assets/icons.d.ts +16 -0
  208. package/lib/typescript/assets/icons.d.ts.map +1 -1
  209. package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
  210. package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
  211. package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
  212. package/lib/typescript/components/MainComponents/ChatWrapper.d.ts.map +1 -1
  213. package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
  214. package/lib/typescript/components/MainComponents/ProfileImagePlaceholder.d.ts.map +1 -1
  215. package/lib/typescript/components/MainComponents/RoomList.d.ts +7 -0
  216. package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
  217. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts +3 -0
  218. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
  219. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts +9 -0
  220. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts.map +1 -1
  221. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts +10 -0
  222. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
  223. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts +9 -0
  224. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -0
  225. package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
  226. package/lib/typescript/components/Modals/Modal/Modal.d.ts.map +1 -1
  227. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts +4 -2
  228. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts.map +1 -1
  229. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts +1 -1
  230. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts.map +1 -1
  231. package/lib/typescript/components/Modals/NewChatModal/UpdNewChatModal.d.ts.map +1 -1
  232. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts +75 -0
  233. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts.map +1 -0
  234. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts +25 -0
  235. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts.map +1 -0
  236. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts +6 -1
  237. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts.map +1 -1
  238. package/lib/typescript/components/Modals/UserProfileModal/EditUserModal.d.ts.map +1 -1
  239. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts +16 -0
  240. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
  241. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts +1 -0
  242. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
  243. package/lib/typescript/components/Modals/styledModalComponents.d.ts.map +1 -1
  244. package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
  245. package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
  246. package/lib/typescript/components/styled/StyledComponents.d.ts.map +1 -1
  247. package/lib/typescript/components/styled/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
  248. package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
  249. package/lib/typescript/helpers/getChatBackground.d.ts +15 -0
  250. package/lib/typescript/helpers/getChatBackground.d.ts.map +1 -0
  251. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts +3 -0
  252. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts.map +1 -0
  253. package/lib/typescript/helpers/pickImageAsset.d.ts +27 -0
  254. package/lib/typescript/helpers/pickImageAsset.d.ts.map +1 -0
  255. package/lib/typescript/helpers/pushPayload.d.ts +7 -0
  256. package/lib/typescript/helpers/pushPayload.d.ts.map +1 -0
  257. package/lib/typescript/helpers/sheetGestures.d.ts +20 -0
  258. package/lib/typescript/helpers/sheetGestures.d.ts.map +1 -0
  259. package/lib/typescript/helpers/updateMessagesTillLast.d.ts.map +1 -1
  260. package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
  261. package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
  262. package/lib/typescript/hooks/usePendingNotification.d.ts.map +1 -1
  263. package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
  264. package/lib/typescript/i18n/strings.d.ts.map +1 -1
  265. package/lib/typescript/main.d.ts +3 -1
  266. package/lib/typescript/main.d.ts.map +1 -1
  267. package/lib/typescript/networking/api-requests/user.api.d.ts +27 -0
  268. package/lib/typescript/networking/api-requests/user.api.d.ts.map +1 -1
  269. package/lib/typescript/networking/authRefresh.d.ts +4 -1
  270. package/lib/typescript/networking/authRefresh.d.ts.map +1 -1
  271. package/lib/typescript/networking/outboundQueue.d.ts +0 -16
  272. package/lib/typescript/networking/outboundQueue.d.ts.map +1 -1
  273. package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
  274. package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts.map +1 -1
  275. package/lib/typescript/networking/xmpp/subscribeToRoomMessages.xmpp.d.ts.map +1 -1
  276. package/lib/typescript/networking/xmppClient.d.ts +8 -33
  277. package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
  278. package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
  279. package/lib/typescript/roomStore/roomsSlice.d.ts +1 -18
  280. package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
  281. package/lib/typescript/services/pushSubscriptionService.d.ts +1 -1
  282. package/lib/typescript/services/pushSubscriptionService.d.ts.map +1 -1
  283. package/lib/typescript/types/models/room.model.d.ts +0 -15
  284. package/lib/typescript/types/models/room.model.d.ts.map +1 -1
  285. package/lib/typescript/types/types.d.ts +31 -20
  286. package/lib/typescript/types/types.d.ts.map +1 -1
  287. package/package.json +6 -1
  288. package/src/assets/icons.tsx +48 -9
  289. package/src/components/Header/HeaderRoomList.tsx +24 -6
  290. package/src/components/MainComponents/ChatHeader.tsx +5 -2
  291. package/src/components/MainComponents/ChatRoom.tsx +38 -20
  292. package/src/components/MainComponents/ChatWrapper.tsx +3 -0
  293. package/src/components/MainComponents/MessageList.tsx +8 -24
  294. package/src/components/MainComponents/ProfileImagePlaceholder.tsx +21 -14
  295. package/src/components/MainComponents/RoomList.tsx +236 -39
  296. package/src/components/Menu/HeaderRoomListMenu.tsx +328 -75
  297. package/src/components/Modals/AttachSheet/AttachSheet.tsx +331 -97
  298. package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +598 -279
  299. package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +244 -0
  300. package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +4 -2
  301. package/src/components/Modals/Modal/Modal.tsx +7 -0
  302. package/src/components/Modals/NewChatModal/ModalContent.tsx +6 -3
  303. package/src/components/Modals/NewChatModal/NewChatModal.tsx +219 -117
  304. package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +12 -1
  305. package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +615 -0
  306. package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +217 -0
  307. package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +14 -4
  308. package/src/components/Modals/UserProfileModal/EditUserModal.tsx +9 -25
  309. package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +617 -307
  310. package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +75 -58
  311. package/src/components/Modals/styledModalComponents.tsx +9 -2
  312. package/src/components/RoomComponents/ChatRoomItem.tsx +14 -7
  313. package/src/components/styled/SendInput.tsx +83 -12
  314. package/src/components/styled/StyledComponents.ts +9 -3
  315. package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +11 -4
  316. package/src/context/xmppProvider.tsx +36 -47
  317. package/src/helpers/getChatBackground.ts +18 -0
  318. package/src/helpers/mediaLibraryRuntime.ts +25 -0
  319. package/src/helpers/pickImageAsset.ts +68 -0
  320. package/src/helpers/pushPayload.ts +62 -0
  321. package/src/helpers/sheetGestures.ts +25 -0
  322. package/src/helpers/updateMessagesTillLast.tsx +17 -42
  323. package/src/hooks/useChatRoomFocus.ts +3 -11
  324. package/src/hooks/useLogout.tsx +0 -7
  325. package/src/hooks/usePendingNotification.ts +5 -11
  326. package/src/hooks/useSendMessage.tsx +24 -60
  327. package/src/i18n/strings.ts +121 -1
  328. package/src/main.ts +4 -1
  329. package/src/networking/api-requests/user.api.ts +71 -0
  330. package/src/networking/authRefresh.ts +25 -4
  331. package/src/networking/outboundQueue.ts +0 -29
  332. package/src/networking/stanzaHandlers.ts +1 -9
  333. package/src/networking/xmpp/presenceInRoom.xmpp.ts +6 -1
  334. package/src/networking/xmpp/subscribeToRoomMessages.xmpp.ts +12 -1
  335. package/src/networking/xmppClient.ts +65 -119
  336. package/src/roomStore/chatSettingsSlice.ts +3 -1
  337. package/src/roomStore/roomsSlice.ts +2 -20
  338. package/src/services/pushSubscriptionService.ts +18 -13
  339. package/src/types/models/room.model.ts +0 -15
  340. package/src/types/types.ts +33 -20
@@ -1,5 +1,6 @@
1
1
  /** @format */
2
2
 
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
3
4
  import React, { FC, useMemo } from 'react';
4
5
  import { View, StyleSheet, Image, Text } from 'react-native';
5
6
  import { ProfileImagePlaceholder } from '../MainComponents/ProfileImagePlaceholder';
@@ -13,6 +14,8 @@ interface HeaderRoomListProps {
13
14
 
14
15
  export const HeaderRoomList: FC<HeaderRoomListProps> = ({ setDrawerOpen }) => {
15
16
  const { config, user, selectedUser } = useChatSettingState();
17
+ const insets = useSafeAreaInsets();
18
+ const topInset = config?.headerLayout?.safeAreaTop ? insets.top : 0;
16
19
 
17
20
  const modalUser: any = selectedUser ?? user;
18
21
 
@@ -34,15 +37,20 @@ export const HeaderRoomList: FC<HeaderRoomListProps> = ({ setDrawerOpen }) => {
34
37
  }, [config?.backgroundChat?.image]);
35
38
 
36
39
  return (
37
- <View style={styles.headerContainer}>
40
+ <View style={[styles.headerContainer, topInset ? { paddingTop: 16 + topInset } : null]}>
38
41
  {!config?.disableRoomMenu && config?.headerMenu ? (
39
42
  <View style={styles.leftContainer}>
40
43
  <Button
44
+ testID="room-list-burger"
41
45
  style={styles.menuButton}
42
46
  color="black"
43
47
  unstyled
44
48
  EndIcon={<BurgerMenuIcon color={config?.colors?.primary} />}
45
- onPress={() => config?.headerMenu && config?.headerMenu()}
49
+ onPress={() =>
50
+ typeof config?.headerMenu === 'function'
51
+ ? config.headerMenu()
52
+ : setDrawerOpen()
53
+ }
46
54
  />
47
55
  </View>
48
56
  ) : (
@@ -59,7 +67,7 @@ export const HeaderRoomList: FC<HeaderRoomListProps> = ({ setDrawerOpen }) => {
59
67
  <ProfileImagePlaceholder
60
68
  icon={modalUser?.profileImage ?? null}
61
69
  name={modalUser?.name ?? modalUser?.firstName}
62
- size={30}
70
+ size={36}
63
71
  click={{
64
72
  isClick: true,
65
73
  onPress: setDrawerOpen,
@@ -76,9 +84,19 @@ const styles = StyleSheet.create({
76
84
  alignItems: 'center',
77
85
  paddingHorizontal: 16,
78
86
  paddingTop: 16,
79
- paddingBottom: 8,
87
+ paddingBottom: 12,
80
88
  minHeight: 56,
81
89
  justifyContent: 'space-between',
90
+ backgroundColor: '#FFFFFF',
91
+ borderBottomLeftRadius: 20,
92
+ borderBottomRightRadius: 20,
93
+ // Lifts the header off the page ground behind it.
94
+ shadowColor: '#101828',
95
+ shadowOffset: { width: 0, height: 4 },
96
+ shadowOpacity: 0.06,
97
+ shadowRadius: 12,
98
+ elevation: 4,
99
+ zIndex: 2,
82
100
  },
83
101
  menuButton: {
84
102
  padding: 8,
@@ -86,7 +104,7 @@ const styles = StyleSheet.create({
86
104
  backgroundColor: 'transparent',
87
105
  },
88
106
  leftContainer: {
89
- width: 40,
107
+ width: 44,
90
108
  alignItems: 'flex-start',
91
109
  justifyContent: 'center',
92
110
  },
@@ -98,7 +116,7 @@ const styles = StyleSheet.create({
98
116
  justifyContent: 'center',
99
117
  },
100
118
  rightContainer: {
101
- width: 40,
119
+ width: 44,
102
120
  alignItems: 'flex-end',
103
121
  justifyContent: 'center',
104
122
  },
@@ -1,6 +1,7 @@
1
1
  /** @format */
2
2
 
3
3
  import React, { useCallback } from 'react';
4
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
5
  import {
5
6
  CenterContainer,
6
7
  ChatContainerHeader,
@@ -87,12 +88,14 @@ const ChatHeader: React.FC<ChatHeaderProps> = ({
87
88
  // here so `height` defines the band exactly (content centers via the
88
89
  // styled `align-items: center`); the styled 12px vertical padding would
89
90
  // otherwise add on top of it.
90
- const headerHeight = resolveHeaderHeight(config?.headerLayout?.height);
91
+ const insets = useSafeAreaInsets();
92
+ const topInset = config?.headerLayout?.safeAreaTop ? insets.top : 0;
93
+ const headerHeight = resolveHeaderHeight(config?.headerLayout?.height) + topInset;
91
94
 
92
95
  return (
93
96
  <>
94
97
  <ChatContainerHeader
95
- style={{ height: headerHeight, paddingTop: 0, paddingBottom: 0 }}
98
+ style={{ height: headerHeight, paddingTop: topInset, paddingBottom: 0 }}
96
99
  >
97
100
  {handleBackClick && !config?.headerChatMenu ? (
98
101
  <View style={styles.leftContainer}>
@@ -20,6 +20,7 @@ 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';
23
24
  import { ChooseChatMessage } from './ChooseChatMessage';
24
25
  import { useRoomUrl } from '../../hooks/useRoomUrl';
25
26
  import { useSendMessage } from '../../hooks/useSendMessage';
@@ -215,30 +216,25 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
215
216
  // Tracks what the user actually saw: `null` while they're at the
216
217
  // bottom (safe to mark everything read), or the timestamp of the
217
218
  // newest message visible when they scrolled away from it. Reported
218
- // published by MessageList into the store. Without this, leaving a
219
+ // by MessageList via onReadBoundaryChange. Without this, leaving a
219
220
  // room (or backgrounding) while scrolled up stamped `now()` as read
220
221
  // and silently discarded genuinely-unread messages. Customer-
221
222
  // reported #33.
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
- );
223
+ const readBoundaryRef = useRef<number | null>(null);
224
+ const handleReadBoundaryChange = useCallback((boundaryTs: number | null) => {
225
+ readBoundaryRef.current = boundaryTs;
226
+ }, []);
231
227
 
232
228
  useEffect(() => {
233
229
  if (!activeRoomJID) {
234
230
  return;
235
231
  }
236
232
 
233
+ readBoundaryRef.current = null;
237
234
  dispatch(setVisibleRoom({ roomJID: activeRoomJID }));
238
235
  setIsLoadingMore(false);
239
236
  return () => {
240
- const boundaryTs = getReadBoundary(activeRoomJID);
241
- const timestamp = boundaryTs ?? new Date().getTime();
237
+ const timestamp = readBoundaryRef.current ?? new Date().getTime();
242
238
  dispatch(
243
239
  setLastViewedTimestamp({
244
240
  chatJID: activeRoomJID,
@@ -256,7 +252,7 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
256
252
  // room, so messages the user never scrolled down to come
257
253
  // back as read on the next login — the local count was
258
254
  // right but the server overrode it.
259
- visibleRoomTs: boundaryTs,
255
+ visibleRoomTs: readBoundaryRef.current,
260
256
  })
261
257
  .catch(() => {});
262
258
  }
@@ -345,7 +341,20 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
345
341
  ? KeyboardStickyView
346
342
  : View;
347
343
  const inputDockProps: any = {
348
- style: { paddingBottom: inputDockPaddingBottom, backgroundColor: '#fff' },
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
+ },
349
358
  ...(stickyInput
350
359
  ? { offset: { closed: 0, opened: keyboardVerticalOffset } }
351
360
  : {}),
@@ -354,11 +363,15 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
354
363
  return (
355
364
  <KeyboardWrapper {...keyboardWrapperProps}>
356
365
  <ChatContainer
357
- style={
358
- configWithEventHandlers?.chatRoomStyles
359
- ? (configWithEventHandlers.chatRoomStyles as import('react-native').ViewStyle)
360
- : undefined
361
- }
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
+ ]}
362
375
  >
363
376
  {!configWithEventHandlers?.disableHeader && (
364
377
  <ChatHeader
@@ -397,7 +410,11 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
397
410
  flex: 1,
398
411
  justifyContent: 'center',
399
412
  alignItems: 'center',
400
- backgroundColor: '#ffffff',
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
+ ),
401
418
  }}
402
419
  >
403
420
  <NoMessagesPlaceholder />
@@ -470,6 +487,7 @@ const ChatRoom: React.FC<ChatRoomProps> = React.memo(
470
487
  config={configWithEventHandlers}
471
488
  loading={isLoadingMore}
472
489
  isReply={false}
490
+ onReadBoundaryChange={handleReadBoundaryChange}
473
491
  />
474
492
  )}
475
493
  </View>
@@ -30,6 +30,7 @@ import Modal from '../Modals/Modal/Modal';
30
30
  import ThreadWrapper from '../Thread/ThreadWrapper';
31
31
  import {ModalWrapper} from '../Modals/ModalWrapper/ModalWrapper';
32
32
  import {useChatSettingState} from '../../hooks/useChatSettingState';
33
+ import { usePendingNotification } from '../../hooks/usePendingNotification';
33
34
  import {DeviceEventEmitter, Pressable, Text, View} from 'react-native';
34
35
  import {pushLog as devPushLog} from '../../utils/devLogger';
35
36
  import {normalizeRoomJid} from '../../helpers/normalizeRoomJid';
@@ -61,6 +62,8 @@ const ChatWrapper: FC<ChatWrapperProps> = ({
61
62
  client: storedClient,
62
63
  } = useChatSettingState();
63
64
 
65
+ usePendingNotification();
66
+
64
67
  const [isInited, setInited] = useState(false);
65
68
  const [showModal, setShowModal] = useState(false);
66
69
  const [errorMsg, setErrorMsg] = useState<string | null>(null);
@@ -18,9 +18,8 @@ import {
18
18
  TouchableOpacity,
19
19
  ImageSourcePropType,
20
20
  } from 'react-native';
21
- import { useDispatch } from 'react-redux';
22
21
  import { IMessage, User, IConfig, IRoom } from '../../types/types';
23
- import { msgSortableMs, setReadBoundary } from '../../roomStore/roomsSlice';
22
+ import { msgSortableMs } from '../../roomStore/roomsSlice';
24
23
  import Composing from '../styled/StyledInputComponents/Composing';
25
24
  import TreadLabel from '../styled/TreadLabel';
26
25
  import { MessageContainer } from './MessageContainer';
@@ -29,6 +28,7 @@ import Loader from '../styled/Loader';
29
28
  import { ArowDownIcon } from '../../assets/icons';
30
29
  import CustomTypingIndicator from '../styled/StyledInputComponents/CustomTypingIndicator';
31
30
  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,7 +78,6 @@ const MessageList = <TMessage extends IMessage>({
78
78
  activeMessage,
79
79
  onReadBoundaryChange,
80
80
  }: MessageListProps<TMessage>) => {
81
- const dispatch = useDispatch();
82
81
  const { composing, messages, composingList } = useRoomState(roomJID)
83
82
  .room! as IRoom;
84
83
  const [isUserAtBottom, setIsUserAtBottom] = useState(true);
@@ -104,21 +103,6 @@ const MessageList = <TMessage extends IMessage>({
104
103
 
105
104
  const flatListRef = useRef<FlatList<IMessage>>(null);
106
105
 
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
-
122
106
  const addReplyMessages = useMemo(() => {
123
107
  return messages.map((message: IMessage) => {
124
108
  const newMessage = {
@@ -359,7 +343,7 @@ const MessageList = <TMessage extends IMessage>({
359
343
  // counter so the badge disappears with the arrow.
360
344
  setUnreadWhileScrolledUp(0);
361
345
  newestSeenTsRef.current = null;
362
- reportReadBoundary(null);
346
+ onReadBoundaryChange?.(null);
363
347
  } else {
364
348
  isUserAtBottomRef.current = false;
365
349
  if (hasUserScrolledRef.current) {
@@ -377,12 +361,12 @@ const MessageList = <TMessage extends IMessage>({
377
361
  },
378
362
  0
379
363
  );
380
- reportReadBoundary(newestSeenTsRef.current);
364
+ onReadBoundaryChange?.(newestSeenTsRef.current);
381
365
  }
382
366
  setIsUserAtBottom(false);
383
367
  }
384
368
  },
385
- [memoizedMessages, reportReadBoundary]
369
+ [memoizedMessages, onReadBoundaryChange]
386
370
  );
387
371
 
388
372
  // Keep the badge in sync with messages that arrive while the user is
@@ -411,7 +395,7 @@ const MessageList = <TMessage extends IMessage>({
411
395
  setIsUserAtBottom(true);
412
396
  setUnreadWhileScrolledUp(0);
413
397
  newestSeenTsRef.current = null;
414
- reportReadBoundary(null);
398
+ onReadBoundaryChange?.(null);
415
399
  scrollToBottom();
416
400
  };
417
401
 
@@ -422,7 +406,7 @@ const MessageList = <TMessage extends IMessage>({
422
406
  setIsUserAtBottom(true);
423
407
  setUnreadWhileScrolledUp(0);
424
408
  newestSeenTsRef.current = null;
425
- reportReadBoundary(null);
409
+ onReadBoundaryChange?.(null);
426
410
  // eslint-disable-next-line react-hooks/exhaustive-deps
427
411
  }, [roomJID]);
428
412
 
@@ -445,7 +429,7 @@ const MessageList = <TMessage extends IMessage>({
445
429
  <View
446
430
  style={[
447
431
  styles.container,
448
- { backgroundColor: config?.backgroundChat?.color || '#F3F6FC' },
432
+ { backgroundColor: getChatBackgroundColor(config) },
449
433
  ]}
450
434
  >
451
435
  <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 = /^[a-zA-Zа-яА-ЯёЁ]$/.test(words[0]?.[0] || '')
72
+ const firstLetter = /^[\p{L}\p{N}]$/u.test(words[0]?.[0] || '')
73
73
  ? words[0][0].toUpperCase()
74
74
  : '';
75
- const secondLetter = /^[a-zA-Zа-яА-ЯёЁ]$/.test(words[1]?.[0] || '')
75
+ const secondLetter = /^[\p{L}\p{N}]$/u.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 = /^[a-zA-Zа-яА-ЯёЁ]$/.test(words[0][0] || '')
82
+ const firstLetter = /^[\p{L}\p{N}]$/u.test(words[0][0] || '')
83
83
  ? words[0][0].toUpperCase()
84
84
  : '';
85
- const secondLetter = /^[a-zA-Zа-яА-ЯёЁ]$/.test(words[0][1] || '')
85
+ const secondLetter = /^[\p{L}\p{N}]$/u.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 /^[a-zA-Zа-яА-ЯёЁ]$/.test(words[0][0] || '')
92
+ return /^[\p{L}\p{N}]$/u.test(words[0][0] || '')
93
93
  ? words[0][0].toUpperCase()
94
94
  : '';
95
95
  }
@@ -97,16 +97,26 @@ export const ProfileImagePlaceholder: React.FC<
97
97
  return '';
98
98
  };
99
99
 
100
- const getInitials = () => (!icon && name ? getTwoUppercaseLetters(name) : '');
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;
101
111
 
102
112
  return (
103
113
  <Wrapper
104
- bgColor={icon ? 'transparent' : backgroundColor?.backgroundColor}
114
+ bgColor={imageSource ? 'transparent' : backgroundColor?.backgroundColor}
105
115
  size={size}
106
116
  isClickable={active || !!upload?.active}
107
117
  >
108
118
  <AvatarCircle
109
- bgColor={icon ? 'transparent' : backgroundColor?.backgroundColor}
119
+ bgColor={imageSource ? 'transparent' : backgroundColor?.backgroundColor}
110
120
  size={size}
111
121
  isClickable={active || !!upload?.active}
112
122
  onPress={
@@ -117,11 +127,8 @@ export const ProfileImagePlaceholder: React.FC<
117
127
  : undefined
118
128
  }
119
129
  >
120
- {icon ? (
121
- <AvatarImage
122
- source={typeof icon === 'string' ? { uri: icon } : icon as any}
123
- size={size}
124
- />
130
+ {imageSource ? (
131
+ <AvatarImage source={imageSource} size={size} />
125
132
  ) : placeholderIcon ? (
126
133
  placeholderIcon
127
134
  ) : (
@@ -140,7 +147,7 @@ export const ProfileImagePlaceholder: React.FC<
140
147
  </Overlay>
141
148
  )}
142
149
  </AvatarCircle>
143
- {remove?.enabled && icon && role !== 'participant' && (
150
+ {remove?.enabled && imageSource && role !== 'participant' && (
144
151
  <RemoveButton onPress={remove.onRemoveClick}>
145
152
  <RemoveButtonText>&times;</RemoveButtonText>
146
153
  </RemoveButton>