@amityco/react-native-social-uikit 4.0.0-5ae18d07.0 → 4.0.0-61103059.0

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 (319) hide show
  1. package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
  2. package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
  3. package/lib/commonjs/components/MediaSection/index.js +3 -3
  4. package/lib/commonjs/components/MediaSection/index.js.map +1 -1
  5. package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js +14 -5
  6. package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
  7. package/lib/commonjs/components/PostTypeChoiceModal/style.js +1 -2
  8. package/lib/commonjs/components/PostTypeChoiceModal/style.js.map +1 -1
  9. package/lib/commonjs/components/Social/PostList/index.js +1 -3
  10. package/lib/commonjs/components/Social/PostList/index.js.map +1 -1
  11. package/lib/commonjs/components/Toast/Toast.js +1 -2
  12. package/lib/commonjs/components/Toast/Toast.js.map +1 -1
  13. package/lib/commonjs/index.js +6 -0
  14. package/lib/commonjs/index.js.map +1 -1
  15. package/lib/commonjs/providers/file-provider.js +19 -38
  16. package/lib/commonjs/providers/file-provider.js.map +1 -1
  17. package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js +16 -16
  18. package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js.map +1 -1
  19. package/lib/commonjs/screens/LivestreamPlayer/index.js +3 -6
  20. package/lib/commonjs/screens/LivestreamPlayer/index.js.map +1 -1
  21. package/lib/commonjs/svg/svg-xml-list.js +2 -7
  22. package/lib/commonjs/svg/svg-xml-list.js.map +1 -1
  23. package/lib/commonjs/util/postTypeChecker.js.map +1 -1
  24. package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +11 -9
  25. package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
  26. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js +1 -1
  27. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js.map +1 -1
  28. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js +2 -1
  29. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
  30. package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +3 -2
  31. package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
  32. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +28 -25
  33. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
  34. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
  35. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
  36. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +217 -68
  37. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
  38. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +50 -0
  39. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +1 -0
  40. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +71 -3
  41. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
  42. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +151 -124
  43. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
  44. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +2 -1
  45. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
  46. package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +1 -37
  47. package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
  48. package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +21 -54
  49. package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
  50. package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +2 -24
  51. package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js.map +1 -1
  52. package/lib/commonjs/v4/assets/icons/toast.js +6 -6
  53. package/lib/commonjs/v4/assets/icons/toast.js.map +1 -1
  54. package/lib/commonjs/v4/component/CommunityStories/index.js +4 -9
  55. package/lib/commonjs/v4/component/CommunityStories/index.js.map +1 -1
  56. package/lib/commonjs/v4/component/CommunityStories/styles.js +2 -7
  57. package/lib/commonjs/v4/component/CommunityStories/styles.js.map +1 -1
  58. package/lib/commonjs/v4/component/LivestreamContent/index.js +12 -12
  59. package/lib/commonjs/v4/component/LivestreamContent/index.js.map +1 -1
  60. package/lib/commonjs/v4/component/LoadingImage/index.js +25 -22
  61. package/lib/commonjs/v4/component/LoadingImage/index.js.map +1 -1
  62. package/lib/commonjs/v4/component/LoadingImage/styles.js +2 -19
  63. package/lib/commonjs/v4/component/LoadingImage/styles.js.map +1 -1
  64. package/lib/commonjs/v4/component/LoadingVideo/index.js +3 -11
  65. package/lib/commonjs/v4/component/LoadingVideo/index.js.map +1 -1
  66. package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js +4 -11
  67. package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js.map +1 -1
  68. package/lib/commonjs/v4/component/MyStories/styles.js +0 -5
  69. package/lib/commonjs/v4/component/MyStories/styles.js.map +1 -1
  70. package/lib/commonjs/v4/component/PostContent/index.js +4 -4
  71. package/lib/commonjs/v4/component/PostContent/index.js.map +1 -1
  72. package/lib/commonjs/v4/component/PostMenu/index.js +2 -2
  73. package/lib/commonjs/v4/component/PostMenu/index.js.map +1 -1
  74. package/lib/commonjs/v4/component/RenderTextWithMention/RenderTextWithMention.js +16 -9
  75. package/lib/commonjs/v4/component/RenderTextWithMention/RenderTextWithMention.js.map +1 -1
  76. package/lib/commonjs/v4/component/Toast/index.js +4 -4
  77. package/lib/commonjs/v4/component/Toast/index.js.map +1 -1
  78. package/lib/commonjs/v4/component/Toast/styles.js +2 -2
  79. package/lib/commonjs/v4/component/Toast/styles.js.map +1 -1
  80. package/lib/commonjs/v4/constants/index.js +2 -1
  81. package/lib/commonjs/v4/constants/index.js.map +1 -1
  82. package/lib/commonjs/v4/enum/roomStatus.js +14 -0
  83. package/lib/commonjs/v4/enum/roomStatus.js.map +1 -0
  84. package/lib/commonjs/v4/hook/index.js +22 -0
  85. package/lib/commonjs/v4/hook/index.js.map +1 -1
  86. package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js +1 -3
  87. package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
  88. package/lib/commonjs/v4/hook/usePostSubscription.js +38 -0
  89. package/lib/commonjs/v4/hook/usePostSubscription.js.map +1 -0
  90. package/lib/commonjs/v4/hook/useRoomSubscription.js +22 -0
  91. package/lib/commonjs/v4/hook/useRoomSubscription.js.map +1 -0
  92. package/lib/commonjs/v4/index.js +7 -0
  93. package/lib/commonjs/v4/index.js.map +1 -1
  94. package/lib/commonjs/v4/stores/slices/toast.js +4 -1
  95. package/lib/commonjs/v4/stores/slices/toast.js.map +1 -1
  96. package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
  97. package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
  98. package/lib/module/components/MediaSection/index.js +3 -3
  99. package/lib/module/components/MediaSection/index.js.map +1 -1
  100. package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js +15 -8
  101. package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
  102. package/lib/module/components/PostTypeChoiceModal/style.js +1 -2
  103. package/lib/module/components/PostTypeChoiceModal/style.js.map +1 -1
  104. package/lib/module/components/Social/PostList/index.js +1 -3
  105. package/lib/module/components/Social/PostList/index.js.map +1 -1
  106. package/lib/module/components/Toast/Toast.js +1 -2
  107. package/lib/module/components/Toast/Toast.js.map +1 -1
  108. package/lib/module/index.js +2 -6
  109. package/lib/module/index.js.map +1 -1
  110. package/lib/module/providers/file-provider.js +19 -38
  111. package/lib/module/providers/file-provider.js.map +1 -1
  112. package/lib/module/screens/CreateLivestream/CreateLivestream.js +17 -17
  113. package/lib/module/screens/CreateLivestream/CreateLivestream.js.map +1 -1
  114. package/lib/module/screens/LivestreamPlayer/index.js +4 -8
  115. package/lib/module/screens/LivestreamPlayer/index.js.map +1 -1
  116. package/lib/module/svg/svg-xml-list.js +1 -5
  117. package/lib/module/svg/svg-xml-list.js.map +1 -1
  118. package/lib/module/util/postTypeChecker.js.map +1 -1
  119. package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +11 -9
  120. package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
  121. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js +1 -1
  122. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js.map +1 -1
  123. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js +2 -1
  124. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
  125. package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +3 -2
  126. package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
  127. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +29 -26
  128. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
  129. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
  130. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
  131. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +222 -72
  132. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
  133. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +42 -0
  134. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +1 -0
  135. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +71 -3
  136. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
  137. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +153 -126
  138. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
  139. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +2 -1
  140. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
  141. package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +1 -37
  142. package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
  143. package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +21 -54
  144. package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
  145. package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +2 -24
  146. package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js.map +1 -1
  147. package/lib/module/v4/assets/icons/toast.js +6 -6
  148. package/lib/module/v4/assets/icons/toast.js.map +1 -1
  149. package/lib/module/v4/component/CommunityStories/index.js +5 -10
  150. package/lib/module/v4/component/CommunityStories/index.js.map +1 -1
  151. package/lib/module/v4/component/CommunityStories/styles.js +2 -7
  152. package/lib/module/v4/component/CommunityStories/styles.js.map +1 -1
  153. package/lib/module/v4/component/LivestreamContent/index.js +13 -13
  154. package/lib/module/v4/component/LivestreamContent/index.js.map +1 -1
  155. package/lib/module/v4/component/LoadingImage/index.js +24 -22
  156. package/lib/module/v4/component/LoadingImage/index.js.map +1 -1
  157. package/lib/module/v4/component/LoadingImage/styles.js +2 -19
  158. package/lib/module/v4/component/LoadingImage/styles.js.map +1 -1
  159. package/lib/module/v4/component/LoadingVideo/index.js +3 -11
  160. package/lib/module/v4/component/LoadingVideo/index.js.map +1 -1
  161. package/lib/module/v4/component/MyStories/StoryCircleItem.js +6 -13
  162. package/lib/module/v4/component/MyStories/StoryCircleItem.js.map +1 -1
  163. package/lib/module/v4/component/MyStories/styles.js +0 -5
  164. package/lib/module/v4/component/MyStories/styles.js.map +1 -1
  165. package/lib/module/v4/component/PostContent/index.js +4 -4
  166. package/lib/module/v4/component/PostContent/index.js.map +1 -1
  167. package/lib/module/v4/component/PostMenu/index.js +2 -2
  168. package/lib/module/v4/component/PostMenu/index.js.map +1 -1
  169. package/lib/module/v4/component/RenderTextWithMention/RenderTextWithMention.js +17 -10
  170. package/lib/module/v4/component/RenderTextWithMention/RenderTextWithMention.js.map +1 -1
  171. package/lib/module/v4/component/Toast/index.js +4 -4
  172. package/lib/module/v4/component/Toast/index.js.map +1 -1
  173. package/lib/module/v4/component/Toast/styles.js +2 -2
  174. package/lib/module/v4/component/Toast/styles.js.map +1 -1
  175. package/lib/module/v4/constants/index.js +1 -0
  176. package/lib/module/v4/constants/index.js.map +1 -1
  177. package/lib/module/v4/enum/roomStatus.js +8 -0
  178. package/lib/module/v4/enum/roomStatus.js.map +1 -0
  179. package/lib/module/v4/hook/index.js +2 -0
  180. package/lib/module/v4/hook/index.js.map +1 -1
  181. package/lib/module/v4/hook/useCustomRankingGlobalFeed.js +1 -3
  182. package/lib/module/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
  183. package/lib/module/v4/hook/usePostSubscription.js +31 -0
  184. package/lib/module/v4/hook/usePostSubscription.js.map +1 -0
  185. package/lib/module/v4/hook/useRoomSubscription.js +15 -0
  186. package/lib/module/v4/hook/useRoomSubscription.js.map +1 -0
  187. package/lib/module/v4/index.js +1 -1
  188. package/lib/module/v4/index.js.map +1 -1
  189. package/lib/module/v4/stores/slices/toast.js +4 -1
  190. package/lib/module/v4/stores/slices/toast.js.map +1 -1
  191. package/lib/typescript/src/components/MediaSection/index.d.ts.map +1 -1
  192. package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts +1 -2
  193. package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts.map +1 -1
  194. package/lib/typescript/src/components/Social/PostList/index.d.ts +1 -3
  195. package/lib/typescript/src/components/Social/PostList/index.d.ts.map +1 -1
  196. package/lib/typescript/src/components/Toast/Toast.d.ts.map +1 -1
  197. package/lib/typescript/src/index.d.ts +2 -2
  198. package/lib/typescript/src/index.d.ts.map +1 -1
  199. package/lib/typescript/src/providers/file-provider.d.ts.map +1 -1
  200. package/lib/typescript/src/screens/LivestreamPlayer/index.d.ts.map +1 -1
  201. package/lib/typescript/src/svg/svg-xml-list.d.ts +0 -1
  202. package/lib/typescript/src/svg/svg-xml-list.d.ts.map +1 -1
  203. package/lib/typescript/src/util/postTypeChecker.d.ts +1 -1
  204. package/lib/typescript/src/util/postTypeChecker.d.ts.map +1 -1
  205. package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts +1 -3
  206. package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts.map +1 -1
  207. package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts +1 -0
  208. package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts.map +1 -1
  209. package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.d.ts.map +1 -1
  210. package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.d.ts +1 -1
  211. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.d.ts.map +1 -1
  212. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts +8 -0
  213. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts.map +1 -0
  214. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts +70 -2
  215. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts.map +1 -1
  216. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.d.ts.map +1 -1
  217. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts +1 -0
  218. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts.map +1 -1
  219. package/lib/typescript/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.d.ts.map +1 -1
  220. package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.d.ts.map +1 -1
  221. package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.d.ts +0 -22
  222. package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.d.ts.map +1 -1
  223. package/lib/typescript/src/v4/assets/icons/toast.d.ts +3 -3
  224. package/lib/typescript/src/v4/assets/icons/toast.d.ts.map +1 -1
  225. package/lib/typescript/src/v4/component/CommunityStories/index.d.ts.map +1 -1
  226. package/lib/typescript/src/v4/component/CommunityStories/styles.d.ts +0 -5
  227. package/lib/typescript/src/v4/component/CommunityStories/styles.d.ts.map +1 -1
  228. package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts +1 -1
  229. package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts.map +1 -1
  230. package/lib/typescript/src/v4/component/LoadingImage/index.d.ts +1 -2
  231. package/lib/typescript/src/v4/component/LoadingImage/index.d.ts.map +1 -1
  232. package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts +0 -21
  233. package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts.map +1 -1
  234. package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts +1 -2
  235. package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts.map +1 -1
  236. package/lib/typescript/src/v4/component/MyStories/StoryCircleItem.d.ts.map +1 -1
  237. package/lib/typescript/src/v4/component/MyStories/styles.d.ts +0 -5
  238. package/lib/typescript/src/v4/component/MyStories/styles.d.ts.map +1 -1
  239. package/lib/typescript/src/v4/component/PostContent/index.d.ts.map +1 -1
  240. package/lib/typescript/src/v4/component/RenderTextWithMention/RenderTextWithMention.d.ts.map +1 -1
  241. package/lib/typescript/src/v4/component/Toast/styles.d.ts +1 -1
  242. package/lib/typescript/src/v4/component/Toast/styles.d.ts.map +1 -1
  243. package/lib/typescript/src/v4/constants/index.d.ts +1 -0
  244. package/lib/typescript/src/v4/constants/index.d.ts.map +1 -1
  245. package/lib/typescript/src/v4/enum/roomStatus.d.ts +8 -0
  246. package/lib/typescript/src/v4/enum/roomStatus.d.ts.map +1 -0
  247. package/lib/typescript/src/v4/hook/index.d.ts +2 -0
  248. package/lib/typescript/src/v4/hook/index.d.ts.map +1 -1
  249. package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts +3 -0
  250. package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts.map +1 -1
  251. package/lib/typescript/src/v4/hook/usePostSubscription.d.ts +4 -0
  252. package/lib/typescript/src/v4/hook/usePostSubscription.d.ts.map +1 -0
  253. package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts +4 -0
  254. package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts.map +1 -0
  255. package/lib/typescript/src/v4/index.d.ts +1 -0
  256. package/lib/typescript/src/v4/index.d.ts.map +1 -1
  257. package/lib/typescript/src/v4/routes/RouteParamList.d.ts +1 -1
  258. package/lib/typescript/src/v4/routes/RouteParamList.d.ts.map +1 -1
  259. package/lib/typescript/src/v4/stores/slices/toast.d.ts +1 -0
  260. package/lib/typescript/src/v4/stores/slices/toast.d.ts.map +1 -1
  261. package/package.json +6 -3
  262. package/src/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.tsx +1 -1
  263. package/src/components/MediaSection/index.tsx +4 -6
  264. package/src/components/PostTypeChoiceModal/PostTypeChoiceModal.tsx +15 -15
  265. package/src/components/PostTypeChoiceModal/style.ts +1 -2
  266. package/src/components/Social/PostList/index.tsx +1 -4
  267. package/src/components/Toast/Toast.tsx +0 -1
  268. package/src/index.tsx +2 -2
  269. package/src/providers/file-provider.tsx +20 -42
  270. package/src/screens/CreateLivestream/CreateLivestream.tsx +17 -17
  271. package/src/screens/LivestreamPlayer/index.tsx +9 -15
  272. package/src/svg/svg-xml-list.ts +1 -7
  273. package/src/util/postTypeChecker.ts +1 -1
  274. package/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.tsx +10 -10
  275. package/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.tsx +1 -1
  276. package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.tsx +1 -1
  277. package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.tsx +1 -1
  278. package/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.ts +3 -2
  279. package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.tsx +24 -25
  280. package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.ts +2 -2
  281. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.tsx +255 -89
  282. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.tsx +48 -0
  283. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.ts +72 -3
  284. package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.tsx +206 -154
  285. package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.ts +2 -0
  286. package/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.tsx +0 -46
  287. package/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.tsx +57 -122
  288. package/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.ts +1 -23
  289. package/src/v4/assets/icons/toast.tsx +9 -12
  290. package/src/v4/component/CommunityStories/index.tsx +17 -26
  291. package/src/v4/component/CommunityStories/styles.ts +2 -7
  292. package/src/v4/component/LivestreamContent/index.tsx +21 -22
  293. package/src/v4/component/LoadingImage/index.tsx +25 -28
  294. package/src/v4/component/LoadingImage/styles.ts +0 -17
  295. package/src/v4/component/LoadingVideo/index.tsx +3 -12
  296. package/src/v4/component/MyStories/StoryCircleItem.tsx +12 -19
  297. package/src/v4/component/MyStories/styles.ts +0 -5
  298. package/src/v4/component/PostContent/index.tsx +6 -8
  299. package/src/v4/component/PostMenu/index.tsx +2 -2
  300. package/src/v4/component/RenderTextWithMention/RenderTextWithMention.tsx +16 -10
  301. package/src/v4/component/Toast/index.tsx +1 -1
  302. package/src/v4/component/Toast/styles.ts +2 -2
  303. package/src/v4/constants/index.ts +3 -0
  304. package/src/v4/enum/roomStatus.ts +7 -0
  305. package/src/v4/hook/index.ts +2 -0
  306. package/src/v4/hook/useCustomRankingGlobalFeed.ts +1 -1
  307. package/src/v4/hook/usePostSubscription.ts +34 -0
  308. package/src/v4/hook/useRoomSubscription.ts +19 -0
  309. package/src/v4/index.tsx +1 -1
  310. package/src/v4/routes/RouteParamList.tsx +1 -1
  311. package/src/v4/stores/slices/toast.ts +5 -0
  312. package/uikit.config.json +1 -1
  313. package/lib/commonjs/v4/enum/livestreamStatus.js +0 -13
  314. package/lib/commonjs/v4/enum/livestreamStatus.js.map +0 -1
  315. package/lib/module/v4/enum/livestreamStatus.js +0 -7
  316. package/lib/module/v4/enum/livestreamStatus.js.map +0 -1
  317. package/lib/typescript/src/v4/enum/livestreamStatus.d.ts +0 -7
  318. package/lib/typescript/src/v4/enum/livestreamStatus.d.ts.map +0 -1
  319. package/src/v4/enum/livestreamStatus.ts +0 -6
@@ -43,8 +43,6 @@ import { Typography } from '../../../../component/Typography/Typography';
43
43
  import { useTheme } from 'react-native-paper';
44
44
  import { MyMD3Theme } from '../../../../../providers/amity-ui-kit-provider';
45
45
  import { useUIKitDispatch } from '../../../../../redux/store';
46
- import { informative } from '~/v4/assets/icons/toast';
47
- import { close as closeIcon } from '../../../../assets/icons';
48
46
 
49
47
  interface IAmityViewStoryItem {
50
48
  communityData: Amity.Community;
@@ -98,6 +96,7 @@ const AmityViewStoryItem: FC<IAmityViewStoryItem> = ({
98
96
  const [isLiked, setIsLiked] = useState<boolean>(myReactions?.length > 0);
99
97
  const [openCommentSheet, setOpenCommentSheet] = useState(false);
100
98
  const [load, setLoad] = useState(true);
99
+ const [error, setError] = useState(false);
101
100
  const [loading, setLoading] = useState(false);
102
101
  const dispatch = useUIKitDispatch();
103
102
  const { showToastMessage } = uiSlice.actions;
@@ -249,20 +248,10 @@ const AmityViewStoryItem: FC<IAmityViewStoryItem> = ({
249
248
  );
250
249
  if (deleted) {
251
250
  current === 0 && previous();
252
- dispatch(
253
- showToastMessage({
254
- toastMessage: 'Story deleted',
255
- isSuccessToast: true,
256
- })
257
- );
251
+ dispatch(showToastMessage({ toastMessage: 'Story deleted' }));
258
252
  }
259
253
  } catch (err) {
260
- dispatch(
261
- showToastMessage({
262
- toastMessage: 'Failed to delete story. Please try again.',
263
- isSuccessToast: false,
264
- })
265
- );
254
+ dispatch(showToastMessage({ toastMessage: 'Delete Story Error!' }));
266
255
  } finally {
267
256
  setLoading(false);
268
257
  sheetRef?.current?.close();
@@ -299,30 +288,6 @@ const AmityViewStoryItem: FC<IAmityViewStoryItem> = ({
299
288
  sheetRef.current?.open();
300
289
  }, [progress]);
301
290
 
302
- const onPressMenuButtonFailed = useCallback(() => {
303
- progress.stopAnimation(() => setPressed(true));
304
- Alert.alert(
305
- 'Failed to upload story',
306
- 'Would you like to discard uploading?',
307
- [
308
- { text: 'Cancel', onPress: () => sheetRef?.current?.close() },
309
- { text: 'Delete', style: 'destructive', onPress: deleteStory },
310
- ]
311
- );
312
- }, [deleteStory, progress]);
313
-
314
- const isFailedImageUpload =
315
- currentStory?.dataType === 'image' &&
316
- (currentStory?.syncState === 'error' ||
317
- currentStory?.syncState === 'syncing' ||
318
- !currentStory?.imageData?.fileUrl);
319
-
320
- const isFailedVideoUpload =
321
- currentStory?.dataType === 'video' &&
322
- (currentStory?.syncState === 'error' ||
323
- currentStory?.syncState === 'syncing' ||
324
- !currentStory?.videoData?.fileUrl);
325
-
326
291
  return (
327
292
  <View style={[styles.container]}>
328
293
  <SafeAreaView>
@@ -331,13 +296,7 @@ const AmityViewStoryItem: FC<IAmityViewStoryItem> = ({
331
296
  <Video
332
297
  onLoadStart={() => setLoad(true)}
333
298
  onProgress={({ currentTime }) => setCurrentSeek(currentTime)}
334
- source={{
335
- uri:
336
- currentStory?.videoData?.fileUrl ||
337
- (typeof currentStory?.data?.fileData === 'string'
338
- ? currentStory?.data?.fileData
339
- : ''),
340
- }}
299
+ source={{ uri: currentStory?.videoData.fileUrl }}
341
300
  style={styles.video}
342
301
  resizeMode="contain"
343
302
  controls={false}
@@ -349,15 +308,12 @@ const AmityViewStoryItem: FC<IAmityViewStoryItem> = ({
349
308
  ) : currentStory?.dataType === 'image' ? (
350
309
  <Image
351
310
  onLoadStart={() => setLoad(true)}
311
+ onError={({ nativeEvent: { error: err } }) =>
312
+ err && setError(true)
313
+ }
352
314
  onLoadEnd={() => start()}
353
- source={{
354
- uri:
355
- currentStory?.imageData?.fileUrl ||
356
- (typeof currentStory?.data?.fileData === 'string'
357
- ? currentStory?.data?.fileData
358
- : ''),
359
- }}
360
- style={[styles.image, isFailedImageUpload && { opacity: 0.6 }]}
315
+ source={{ uri: currentStory?.imageData.fileUrl }}
316
+ style={[styles.image]}
361
317
  resizeMode="contain"
362
318
  />
363
319
  ) : null}
@@ -366,6 +322,11 @@ const AmityViewStoryItem: FC<IAmityViewStoryItem> = ({
366
322
  <ActivityIndicator size="large" color={'white'} />
367
323
  </View>
368
324
  )}
325
+ {error && (
326
+ <View style={styles.spinnerContainer}>
327
+ <Text style={styles.error}>Story load error</Text>
328
+ </View>
329
+ )}
369
330
  </View>
370
331
  </SafeAreaView>
371
332
  <GestureRecognizer onSwipeUp={onPressComment} style={styles.flexCol}>
@@ -438,12 +399,7 @@ const AmityViewStoryItem: FC<IAmityViewStoryItem> = ({
438
399
  </TouchableOpacity>
439
400
  )}
440
401
  <TouchableOpacity hitSlop={5} onPress={() => onClose()}>
441
- <SvgXml
442
- xml={closeIcon()}
443
- width="28"
444
- height="28"
445
- color="white"
446
- />
402
+ <Text style={styles.whiteText}>X</Text>
447
403
  </TouchableOpacity>
448
404
  </View>
449
405
  </View>
@@ -509,70 +465,49 @@ const AmityViewStoryItem: FC<IAmityViewStoryItem> = ({
509
465
  </TouchableOpacity>
510
466
  )}
511
467
  </GestureRecognizer>
512
- {(isFailedImageUpload || isFailedVideoUpload) && hasStoryPermission ? (
513
- <View style={styles.errorContainer}>
514
- <View style={styles.errorContainerLeft}>
515
- <SvgXml xml={informative('white')} width="20" height="20" />
516
- <Typography.Body style={styles.errorText}>
517
- Failed to upload story
518
- </Typography.Body>
519
- </View>
520
- {
521
- <TouchableOpacity
522
- hitSlop={5}
523
- style={styles.threeDotsMenu}
524
- onPress={onPressMenuButtonFailed}
525
- >
526
- <SvgXml xml={storyThreedotsMenu()} width="20" height="20" />
527
- </TouchableOpacity>
528
- }
529
- </View>
530
- ) : (
531
- <View style={styles.footer}>
532
- {hasStoryImpressionPermission ? (
533
- <TouchableOpacity
534
- style={[
535
- styles.seenContainer,
536
- { backgroundColor: storyViewerBgColor },
537
- ]}
538
- >
539
- <SvgXml xml={seenIcon()} width="25" height="25" />
540
- <Text style={styles.seen}>{reachCount}</Text>
541
- </TouchableOpacity>
542
- ) : (
543
- <View style={styles.seenContainer} />
544
- )}
545
- <View style={styles.seenContainer}>
546
- <TouchableOpacity
547
- style={[
548
- styles.iconContainer,
549
- { backgroundColor: storyCommentBgColor },
550
- ]}
551
- onPress={onPressComment}
552
- >
553
- <SvgXml xml={storyCommentIcon()} width="25" height="25" />
554
- <Text style={styles.seen}>{commentsCounts}</Text>
555
- </TouchableOpacity>
556
- <TouchableOpacity
557
- style={[
558
- styles.iconContainer,
559
- {
560
- backgroundColor: storyReactionBgColor,
561
- },
562
- ]}
563
- onPress={onPressReaction}
564
- >
565
- <SvgXml
566
- xml={isLiked ? storyLikedIcon : storyLikeIcon}
567
- width="25"
568
- height="25"
569
- />
570
- <Text style={styles.seen}>{totalReaction}</Text>
571
- </TouchableOpacity>
572
- </View>
468
+ <View style={styles.footer}>
469
+ {hasStoryImpressionPermission ? (
470
+ <TouchableOpacity
471
+ style={[
472
+ styles.seenContainer,
473
+ { backgroundColor: storyViewerBgColor },
474
+ ]}
475
+ >
476
+ <SvgXml xml={seenIcon()} width="25" height="25" />
477
+ <Text style={styles.seen}>{reachCount}</Text>
478
+ </TouchableOpacity>
479
+ ) : (
480
+ <View style={styles.seenContainer} />
481
+ )}
482
+ <View style={styles.seenContainer}>
483
+ <TouchableOpacity
484
+ style={[
485
+ styles.iconContainer,
486
+ { backgroundColor: storyCommentBgColor },
487
+ ]}
488
+ onPress={onPressComment}
489
+ >
490
+ <SvgXml xml={storyCommentIcon()} width="25" height="25" />
491
+ <Text style={styles.seen}>{commentsCounts}</Text>
492
+ </TouchableOpacity>
493
+ <TouchableOpacity
494
+ style={[
495
+ styles.iconContainer,
496
+ {
497
+ backgroundColor: storyReactionBgColor,
498
+ },
499
+ ]}
500
+ onPress={onPressReaction}
501
+ >
502
+ <SvgXml
503
+ xml={isLiked ? storyLikedIcon : storyLikeIcon}
504
+ width="25"
505
+ height="25"
506
+ />
507
+ <Text style={styles.seen}>{totalReaction}</Text>
508
+ </TouchableOpacity>
573
509
  </View>
574
- )}
575
-
510
+ </View>
576
511
  {openCommentSheet && (
577
512
  <Modal
578
513
  style={styles.bottomSheet}
@@ -14,7 +14,6 @@ export const useStyles = () => {
14
14
  flex: 1,
15
15
  width: width,
16
16
  backgroundColor: '#000',
17
- position: 'relative',
18
17
  },
19
18
  flex: {
20
19
  flex: 1,
@@ -74,7 +73,7 @@ export const useStyles = () => {
74
73
  fontSize: 14,
75
74
  },
76
75
  avatarSubText: {
77
- color: 'white',
76
+ color: theme.colors.background,
78
77
  fontSize: 12,
79
78
  },
80
79
  closeIconContainer: {
@@ -220,27 +219,6 @@ export const useStyles = () => {
220
219
  color: theme.colors.base,
221
220
  fontSize: 14,
222
221
  },
223
- errorContainer: {
224
- width: '100%',
225
- position: 'absolute',
226
- bottom: 120,
227
- left: 0,
228
- backgroundColor: theme.colors.alert,
229
- flexDirection: 'row',
230
- alignItems: 'center',
231
- justifyContent: 'space-between',
232
- paddingVertical: 12,
233
- paddingHorizontal: 16,
234
- },
235
- errorContainerLeft: {
236
- display: 'flex',
237
- flexDirection: 'row',
238
- alignItems: 'center',
239
- gap: 4,
240
- },
241
- errorText: {
242
- color: 'white',
243
- },
244
222
  });
245
223
 
246
224
  return styles;
@@ -1,21 +1,18 @@
1
- export const failed = (
2
- color: string = 'currentColor'
3
- ) => `<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4
- <path d="M12 3.53125C16.7812 3.53125 20.7188 7.46875 20.7188 12.25C20.7188 17.0664 16.7812 20.9688 12 20.9688C7.18359 20.9688 3.28125 17.0664 3.28125 12.25C3.28125 7.46875 7.18359 3.53125 12 3.53125ZM12 19.2812C15.8672 19.2812 19.0312 16.1523 19.0312 12.25C19.0312 8.38281 15.8672 5.21875 12 5.21875C8.09766 5.21875 4.96875 8.38281 4.96875 12.25C4.96875 16.1523 8.09766 19.2812 12 19.2812ZM13.4766 15.625C13.4766 16.4688 12.8086 17.1016 12 17.1016C11.1562 17.1016 10.5234 16.4688 10.5234 15.625C10.5234 14.8164 11.1562 14.1484 12 14.1484C12.8086 14.1484 13.4766 14.8164 13.4766 15.625ZM10.5938 8.20703C10.5938 7.96094 10.7695 7.75 11.0156 7.75H12.9492C13.1953 7.75 13.3711 7.96094 13.3711 8.20703L13.125 12.9883C13.125 13.1992 12.9141 13.375 12.7031 13.375H11.2617C11.0508 13.375 10.8398 13.1992 10.8398 12.9883L10.5938 8.20703Z" fill=${color}/>
1
+ export const failed =
2
+ () => `<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M12 3.53125C16.7812 3.53125 20.7188 7.46875 20.7188 12.25C20.7188 17.0664 16.7812 20.9688 12 20.9688C7.18359 20.9688 3.28125 17.0664 3.28125 12.25C3.28125 7.46875 7.18359 3.53125 12 3.53125ZM12 19.2812C15.8672 19.2812 19.0312 16.1523 19.0312 12.25C19.0312 8.38281 15.8672 5.21875 12 5.21875C8.09766 5.21875 4.96875 8.38281 4.96875 12.25C4.96875 16.1523 8.09766 19.2812 12 19.2812ZM13.4766 15.625C13.4766 16.4688 12.8086 17.1016 12 17.1016C11.1562 17.1016 10.5234 16.4688 10.5234 15.625C10.5234 14.8164 11.1562 14.1484 12 14.1484C12.8086 14.1484 13.4766 14.8164 13.4766 15.625ZM10.5938 8.20703C10.5938 7.96094 10.7695 7.75 11.0156 7.75H12.9492C13.1953 7.75 13.3711 7.96094 13.3711 8.20703L13.125 12.9883C13.125 13.1992 12.9141 13.375 12.7031 13.375H11.2617C11.0508 13.375 10.8398 13.1992 10.8398 12.9883L10.5938 8.20703Z" fill="white"/>
5
4
  </svg>
6
5
 
7
6
  `;
8
7
 
9
- export const success = (
10
- color: string = 'currentColor'
11
- ) => `<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
12
- <path d="M12 3.53125C16.7812 3.53125 20.7188 7.46875 20.7188 12.25C20.7188 17.0664 16.7812 20.9688 12 20.9688C7.18359 20.9688 3.28125 17.0664 3.28125 12.25C3.28125 7.46875 7.18359 3.53125 12 3.53125ZM12 5.21875C8.09766 5.21875 4.96875 8.38281 4.96875 12.25C4.96875 16.1523 8.09766 19.2812 12 19.2812C15.8672 19.2812 19.0312 16.1523 19.0312 12.25C19.0312 8.38281 15.8672 5.21875 12 5.21875ZM16.9219 9.82422C17.0625 9.96484 17.0625 10.2461 16.9219 10.4219L10.8398 16.4336C10.6641 16.6094 10.418 16.6094 10.2422 16.4336L7.04297 13.1992C6.90234 13.0586 6.90234 12.7773 7.04297 12.6016L7.85156 11.8281C8.02734 11.6523 8.27344 11.6523 8.44922 11.8281L10.5586 13.9375L15.5156 9.01562C15.6914 8.83984 15.9727 8.83984 16.1133 9.01562L16.9219 9.82422Z" fill=${color}/>
8
+ export const success =
9
+ () => `<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
10
+ <path d="M12 3.53125C16.7812 3.53125 20.7188 7.46875 20.7188 12.25C20.7188 17.0664 16.7812 20.9688 12 20.9688C7.18359 20.9688 3.28125 17.0664 3.28125 12.25C3.28125 7.46875 7.18359 3.53125 12 3.53125ZM12 5.21875C8.09766 5.21875 4.96875 8.38281 4.96875 12.25C4.96875 16.1523 8.09766 19.2812 12 19.2812C15.8672 19.2812 19.0312 16.1523 19.0312 12.25C19.0312 8.38281 15.8672 5.21875 12 5.21875ZM16.9219 9.82422C17.0625 9.96484 17.0625 10.2461 16.9219 10.4219L10.8398 16.4336C10.6641 16.6094 10.418 16.6094 10.2422 16.4336L7.04297 13.1992C6.90234 13.0586 6.90234 12.7773 7.04297 12.6016L7.85156 11.8281C8.02734 11.6523 8.27344 11.6523 8.44922 11.8281L10.5586 13.9375L15.5156 9.01562C15.6914 8.83984 15.9727 8.83984 16.1133 9.01562L16.9219 9.82422Z" fill="currentColor"/>
13
11
  </svg>
14
12
  `;
15
13
 
16
- export const informative = (
17
- color: string = 'currentColor'
18
- ) => `<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
19
- <path d="M12 3.53125C16.7812 3.53125 20.7188 7.46875 20.7188 12.25C20.7188 17.0664 16.7812 20.9688 12 20.9688C7.18359 20.9688 3.28125 17.0664 3.28125 12.25C3.28125 7.46875 7.18359 3.53125 12 3.53125ZM12 19.2812C15.8672 19.2812 19.0312 16.1523 19.0312 12.25C19.0312 8.38281 15.8672 5.21875 12 5.21875C8.09766 5.21875 4.96875 8.38281 4.96875 12.25C4.96875 16.1523 8.09766 19.2812 12 19.2812ZM12 7.39844C12.8086 7.39844 13.4766 8.06641 13.4766 8.875C13.4766 9.71875 12.8086 10.3516 12 10.3516C11.1562 10.3516 10.5234 9.71875 10.5234 8.875C10.5234 8.06641 11.1562 7.39844 12 7.39844ZM13.9688 16.3281C13.9688 16.5742 13.7578 16.75 13.5469 16.75H10.4531C10.207 16.75 10.0312 16.5742 10.0312 16.3281V15.4844C10.0312 15.2734 10.207 15.0625 10.4531 15.0625H10.875V12.8125H10.4531C10.207 12.8125 10.0312 12.6367 10.0312 12.3906V11.5469C10.0312 11.3359 10.207 11.125 10.4531 11.125H12.7031C12.9141 11.125 13.125 11.3359 13.125 11.5469V15.0625H13.5469C13.7578 15.0625 13.9688 15.2734 13.9688 15.4844V16.3281Z" fill=${color}/>
14
+ export const informative =
15
+ () => `<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
16
+ <path d="M12 3.53125C16.7812 3.53125 20.7188 7.46875 20.7188 12.25C20.7188 17.0664 16.7812 20.9688 12 20.9688C7.18359 20.9688 3.28125 17.0664 3.28125 12.25C3.28125 7.46875 7.18359 3.53125 12 3.53125ZM12 19.2812C15.8672 19.2812 19.0312 16.1523 19.0312 12.25C19.0312 8.38281 15.8672 5.21875 12 5.21875C8.09766 5.21875 4.96875 8.38281 4.96875 12.25C4.96875 16.1523 8.09766 19.2812 12 19.2812ZM12 7.39844C12.8086 7.39844 13.4766 8.06641 13.4766 8.875C13.4766 9.71875 12.8086 10.3516 12 10.3516C11.1562 10.3516 10.5234 9.71875 10.5234 8.875C10.5234 8.06641 11.1562 7.39844 12 7.39844ZM13.9688 16.3281C13.9688 16.5742 13.7578 16.75 13.5469 16.75H10.4531C10.207 16.75 10.0312 16.5742 10.0312 16.3281V15.4844C10.0312 15.2734 10.207 15.0625 10.4531 15.0625H10.875V12.8125H10.4531C10.207 12.8125 10.0312 12.6367 10.0312 12.3906V11.5469C10.0312 11.3359 10.207 11.125 10.4531 11.125H12.7031C12.9141 11.125 13.125 11.3359 13.125 11.5469V15.0625H13.5469C13.7578 15.0625 13.9688 15.2734 13.9688 15.4844V16.3281Z" fill="white"/>
20
17
  </svg>
21
18
  `;
@@ -5,7 +5,6 @@ import { useStory } from '../../hook/useStory';
5
5
  import { useFocusEffect, useNavigation } from '@react-navigation/native';
6
6
  import { SvgXml } from 'react-native-svg';
7
7
  import {
8
- errorIcon,
9
8
  storyCircleCreatePlusIcon,
10
9
  storyRing,
11
10
  } from '../../../svg/svg-xml-list';
@@ -35,18 +34,17 @@ const CommunityStories = ({ communityId, community }: ICommunityStories) => {
35
34
  const { getImage } = useFile();
36
35
  const [avatarUrl, setAvatarUrl] = useState(undefined);
37
36
  const [viewStory, setViewStory] = useState(false);
38
- const storyRingColor: string[] =
39
- hasStoryPermission && storyTarget?.failedStoriesCount > 0
40
- ? ['#DE1029', '#DE1029']
41
- : storyTarget?.hasUnseen
42
- ? (getUiKitConfig({
43
- page: PageID.StoryPage,
44
- component: ComponentID.StoryTab,
45
- element: ElementID.StoryRing,
46
- })?.progress_color as string[]) ?? ['#e2e2e2', '#e2e2e2']
47
- : stories.length > 0
48
- ? ['#e2e2e2', '#ffffff']
49
- : ['#ffffff', '#ffffff'];
37
+ const storyRingColor: string[] = storyTarget?.hasUnseen
38
+ ? (getUiKitConfig({
39
+ page: PageID.StoryPage,
40
+ component: ComponentID.StoryTab,
41
+ element: ElementID.StoryRing,
42
+ })?.progress_color as string[]) ?? ['#e2e2e2', '#e2e2e2']
43
+ : storyTarget?.failedStoriesCount > 0
44
+ ? ['#DE1029', '#DE1029']
45
+ : stories.length > 0
46
+ ? ['#e2e2e2', '#ffffff']
47
+ : ['#ffffff', '#ffffff'];
50
48
 
51
49
  useEffect(() => {
52
50
  (async () => {
@@ -88,7 +86,6 @@ const CommunityStories = ({ communityId, community }: ICommunityStories) => {
88
86
  setViewStory(false);
89
87
  onPressCreateStory();
90
88
  }, [onPressCreateStory]);
91
-
92
89
  const onPressCommunityName = useCallback(() => {
93
90
  setViewStory(false);
94
91
  navigation.navigate('CommunityProfilePage', {
@@ -124,18 +121,12 @@ const CommunityStories = ({ communityId, community }: ICommunityStories) => {
124
121
  height={48}
125
122
  xml={storyRing(storyRingColor[0], storyRingColor[1])}
126
123
  />
127
- {hasStoryPermission ? (
128
- storyTarget?.failedStoriesCount > 0 ? (
129
- <SvgXml style={styles.errorIcon} xml={errorIcon()} />
130
- ) : (
131
- <TouchableOpacity onPress={() => onPressCreateStory()}>
132
- <SvgXml
133
- style={styles.storyCreateIcon}
134
- xml={storyCircleCreatePlusIcon()}
135
- />
136
- </TouchableOpacity>
137
- )
138
- ) : null}
124
+ {hasStoryPermission && (
125
+ <SvgXml
126
+ style={styles.storyCreateIcon}
127
+ xml={storyCircleCreatePlusIcon()}
128
+ />
129
+ )}
139
130
  </TouchableOpacity>
140
131
  <Typography.Caption style={styles.base}>Story</Typography.Caption>
141
132
  </>
@@ -91,15 +91,10 @@ export const useStyles = () => {
91
91
  alignItems: 'center',
92
92
  width: 68,
93
93
  },
94
- errorIcon: {
95
- position: 'absolute',
96
- right: 8,
97
- bottom: 0,
98
- },
99
94
  storyCreateIcon: {
100
95
  position: 'absolute',
101
- left: 8,
102
- top: -16,
96
+ left: 42,
97
+ top: 30,
103
98
  },
104
99
  base: {
105
100
  color: theme.colors.base,
@@ -7,14 +7,14 @@ import {
7
7
  ImageStyle,
8
8
  } from 'react-native';
9
9
  import React, { useEffect, useState, useCallback, Fragment } from 'react';
10
- import { FileRepository, StreamRepository } from '@amityco/ts-sdk-react-native';
10
+ import { FileRepository, RoomRepository } from '@amityco/ts-sdk-react-native';
11
11
  import { useStyles } from './styles';
12
12
  import { useNavigation } from '@react-navigation/native';
13
13
  import { SvgXml } from 'react-native-svg';
14
14
  import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
15
15
  import { play } from '../../assets/icons';
16
16
  import { Typography } from '../Typography/Typography';
17
- import { LivestreamStatus } from '../../enum/livestreamStatus';
17
+ import { RoomStatus } from '../../enum/roomStatus';
18
18
  import LiveStreamEndThumbnail from './LivestreamEndedThumbnail';
19
19
  import LiveStreamIdleThumbnail from './LivestreamIdleThumbnail';
20
20
  import RenderTextWithMention from '../RenderTextWithMention/RenderTextWithMention';
@@ -22,14 +22,14 @@ import { RootStackParamList } from '../../routes/RouteParamList';
22
22
  import LiveStreamTerminatedThumbnail from './LivestreamTerminatedThumbnail';
23
23
 
24
24
  interface ILivestreamContent {
25
- streamId: Amity.Stream['streamId'];
25
+ roomId: Amity.Room['roomId'];
26
26
  onPressPost: () => void;
27
27
  post: Amity.Post;
28
28
  }
29
29
 
30
30
  const LivestreamContent: React.FC<ILivestreamContent> = ({
31
31
  post,
32
- streamId,
32
+ roomId,
33
33
  onPressPost,
34
34
  }) => {
35
35
  const { styles, theme } = useStyles();
@@ -39,18 +39,18 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
39
39
  >();
40
40
 
41
41
  const [error, setError] = useState<boolean>(false);
42
- const [livestream, setLivestream] = useState<Amity.Stream>();
42
+ const [livestream, setLivestream] = useState<Amity.Room>();
43
43
  const [thumbnailUrl, setThumbnailUrl] = useState<ImageSourcePropType>();
44
44
  const [isUpcoming, setIsUpcoming] = useState<boolean>(false);
45
45
 
46
46
  const onPlayLivestream = useCallback(() => {
47
47
  navigation.navigate('LivestreamPlayer', {
48
48
  post,
49
- streamId: livestream.streamId,
49
+ roomId: livestream.roomId,
50
50
  });
51
51
  }, [livestream, navigation, post]);
52
52
 
53
- const getLivestreamThumbnail = async (currentStream: Amity.Stream) => {
53
+ const getLivestreamThumbnail = async (currentStream: Amity.Room) => {
54
54
  const defaultThumbnail = require('../../assets/images/livestream.png');
55
55
 
56
56
  if (currentStream.thumbnailFileId) {
@@ -71,8 +71,8 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
71
71
 
72
72
  useEffect(() => {
73
73
  setIsUpcoming(true);
74
- const unsubscribe = StreamRepository.getStreamById(
75
- streamId,
74
+ const unsubscribe = RoomRepository.getRoom(
75
+ roomId,
76
76
  ({ data, loading, error: streamError }) => {
77
77
  if (streamError) setError(!!streamError);
78
78
  if (!loading && data) {
@@ -86,13 +86,13 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
86
86
  return () => {
87
87
  unsubscribe();
88
88
  };
89
- }, [streamId]);
89
+ }, [roomId]);
90
90
 
91
91
  if (!livestream) return null;
92
92
 
93
93
  if (error || livestream?.isDeleted) {
94
94
  return (
95
- <View key={livestream.streamId} style={styles.container}>
95
+ <View key={livestream.roomId} style={styles.container}>
96
96
  <LiveStreamIdleThumbnail />
97
97
  </View>
98
98
  );
@@ -102,12 +102,12 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
102
102
  livestream?.moderation?.terminateLabels &&
103
103
  livestream?.moderation?.terminateLabels?.length > 0;
104
104
  const isLiveOrEnded =
105
- livestream?.status === LivestreamStatus.live ||
106
- livestream?.status === LivestreamStatus.ended;
105
+ livestream?.status === RoomStatus.live ||
106
+ livestream?.status === RoomStatus.ended;
107
107
 
108
108
  if (isTerminated && isLiveOrEnded) {
109
109
  return (
110
- <View key={livestream.streamId} style={styles.container}>
110
+ <View key={livestream.roomId} style={styles.container}>
111
111
  <LiveStreamTerminatedThumbnail />
112
112
  </View>
113
113
  );
@@ -129,7 +129,7 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
129
129
  )}
130
130
  </Pressable>
131
131
  <View style={styles.container}>
132
- {(livestream.status === LivestreamStatus.idle || isUpcoming) &&
132
+ {(livestream.status === RoomStatus.idle || isUpcoming) &&
133
133
  thumbnailUrl && (
134
134
  <View style={styles.content}>
135
135
  <Image
@@ -144,12 +144,10 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
144
144
  </View>
145
145
  )}
146
146
 
147
- {livestream.status === LivestreamStatus.ended && (
148
- <LiveStreamEndThumbnail />
149
- )}
147
+ {livestream.status === RoomStatus.ended && <LiveStreamEndThumbnail />}
150
148
 
151
- {(livestream.status === LivestreamStatus.live ||
152
- livestream.status === LivestreamStatus.recorded) &&
149
+ {(livestream.status === RoomStatus.live ||
150
+ livestream.status === RoomStatus.recorded) &&
153
151
  thumbnailUrl &&
154
152
  !isUpcoming && (
155
153
  <View style={styles.content}>
@@ -157,14 +155,15 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
157
155
  source={thumbnailUrl}
158
156
  style={styles.streamImageCover as ImageStyle}
159
157
  />
160
- {livestream.status === LivestreamStatus.live && (
158
+ {(livestream.status === RoomStatus.live ||
159
+ livestream.status === RoomStatus.waiting_reconnect) && (
161
160
  <View style={styles.streamStatusLive}>
162
161
  <Typography.CaptionBold style={styles.streamStatusText}>
163
162
  LIVE
164
163
  </Typography.CaptionBold>
165
164
  </View>
166
165
  )}
167
- {livestream.status === LivestreamStatus.recorded && (
166
+ {livestream.status === RoomStatus.recorded && (
168
167
  <View style={styles.streamStatusRecorded}>
169
168
  <Typography.CaptionBold style={styles.streamStatusText}>
170
169
  RECORDED