@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.
- package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
- package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
- package/lib/commonjs/components/MediaSection/index.js +3 -3
- package/lib/commonjs/components/MediaSection/index.js.map +1 -1
- package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js +14 -5
- package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
- package/lib/commonjs/components/PostTypeChoiceModal/style.js +1 -2
- package/lib/commonjs/components/PostTypeChoiceModal/style.js.map +1 -1
- package/lib/commonjs/components/Social/PostList/index.js +1 -3
- package/lib/commonjs/components/Social/PostList/index.js.map +1 -1
- package/lib/commonjs/components/Toast/Toast.js +1 -2
- package/lib/commonjs/components/Toast/Toast.js.map +1 -1
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/providers/file-provider.js +19 -38
- package/lib/commonjs/providers/file-provider.js.map +1 -1
- package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js +16 -16
- package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js.map +1 -1
- package/lib/commonjs/screens/LivestreamPlayer/index.js +3 -6
- package/lib/commonjs/screens/LivestreamPlayer/index.js.map +1 -1
- package/lib/commonjs/svg/svg-xml-list.js +2 -7
- package/lib/commonjs/svg/svg-xml-list.js.map +1 -1
- package/lib/commonjs/util/postTypeChecker.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +11 -9
- package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js +2 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +3 -2
- package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +28 -25
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +217 -68
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +50 -0
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +1 -0
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +71 -3
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +151 -124
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +2 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +1 -37
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +21 -54
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +2 -24
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js.map +1 -1
- package/lib/commonjs/v4/assets/icons/toast.js +6 -6
- package/lib/commonjs/v4/assets/icons/toast.js.map +1 -1
- package/lib/commonjs/v4/component/CommunityStories/index.js +4 -9
- package/lib/commonjs/v4/component/CommunityStories/index.js.map +1 -1
- package/lib/commonjs/v4/component/CommunityStories/styles.js +2 -7
- package/lib/commonjs/v4/component/CommunityStories/styles.js.map +1 -1
- package/lib/commonjs/v4/component/LivestreamContent/index.js +12 -12
- package/lib/commonjs/v4/component/LivestreamContent/index.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingImage/index.js +25 -22
- package/lib/commonjs/v4/component/LoadingImage/index.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingImage/styles.js +2 -19
- package/lib/commonjs/v4/component/LoadingImage/styles.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingVideo/index.js +3 -11
- package/lib/commonjs/v4/component/LoadingVideo/index.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js +4 -11
- package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/styles.js +0 -5
- package/lib/commonjs/v4/component/MyStories/styles.js.map +1 -1
- package/lib/commonjs/v4/component/PostContent/index.js +4 -4
- package/lib/commonjs/v4/component/PostContent/index.js.map +1 -1
- package/lib/commonjs/v4/component/PostMenu/index.js +2 -2
- package/lib/commonjs/v4/component/PostMenu/index.js.map +1 -1
- package/lib/commonjs/v4/component/RenderTextWithMention/RenderTextWithMention.js +16 -9
- package/lib/commonjs/v4/component/RenderTextWithMention/RenderTextWithMention.js.map +1 -1
- package/lib/commonjs/v4/component/Toast/index.js +4 -4
- package/lib/commonjs/v4/component/Toast/index.js.map +1 -1
- package/lib/commonjs/v4/component/Toast/styles.js +2 -2
- package/lib/commonjs/v4/component/Toast/styles.js.map +1 -1
- package/lib/commonjs/v4/constants/index.js +2 -1
- package/lib/commonjs/v4/constants/index.js.map +1 -1
- package/lib/commonjs/v4/enum/roomStatus.js +14 -0
- package/lib/commonjs/v4/enum/roomStatus.js.map +1 -0
- package/lib/commonjs/v4/hook/index.js +22 -0
- package/lib/commonjs/v4/hook/index.js.map +1 -1
- package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js +1 -3
- package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
- package/lib/commonjs/v4/hook/usePostSubscription.js +38 -0
- package/lib/commonjs/v4/hook/usePostSubscription.js.map +1 -0
- package/lib/commonjs/v4/hook/useRoomSubscription.js +22 -0
- package/lib/commonjs/v4/hook/useRoomSubscription.js.map +1 -0
- package/lib/commonjs/v4/index.js +7 -0
- package/lib/commonjs/v4/index.js.map +1 -1
- package/lib/commonjs/v4/stores/slices/toast.js +4 -1
- package/lib/commonjs/v4/stores/slices/toast.js.map +1 -1
- package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
- package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
- package/lib/module/components/MediaSection/index.js +3 -3
- package/lib/module/components/MediaSection/index.js.map +1 -1
- package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js +15 -8
- package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
- package/lib/module/components/PostTypeChoiceModal/style.js +1 -2
- package/lib/module/components/PostTypeChoiceModal/style.js.map +1 -1
- package/lib/module/components/Social/PostList/index.js +1 -3
- package/lib/module/components/Social/PostList/index.js.map +1 -1
- package/lib/module/components/Toast/Toast.js +1 -2
- package/lib/module/components/Toast/Toast.js.map +1 -1
- package/lib/module/index.js +2 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/file-provider.js +19 -38
- package/lib/module/providers/file-provider.js.map +1 -1
- package/lib/module/screens/CreateLivestream/CreateLivestream.js +17 -17
- package/lib/module/screens/CreateLivestream/CreateLivestream.js.map +1 -1
- package/lib/module/screens/LivestreamPlayer/index.js +4 -8
- package/lib/module/screens/LivestreamPlayer/index.js.map +1 -1
- package/lib/module/svg/svg-xml-list.js +1 -5
- package/lib/module/svg/svg-xml-list.js.map +1 -1
- package/lib/module/util/postTypeChecker.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +11 -9
- package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js +2 -1
- package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
- package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +3 -2
- package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +29 -26
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +222 -72
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +42 -0
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +1 -0
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +71 -3
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +153 -126
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +2 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +1 -37
- package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +21 -54
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +2 -24
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js.map +1 -1
- package/lib/module/v4/assets/icons/toast.js +6 -6
- package/lib/module/v4/assets/icons/toast.js.map +1 -1
- package/lib/module/v4/component/CommunityStories/index.js +5 -10
- package/lib/module/v4/component/CommunityStories/index.js.map +1 -1
- package/lib/module/v4/component/CommunityStories/styles.js +2 -7
- package/lib/module/v4/component/CommunityStories/styles.js.map +1 -1
- package/lib/module/v4/component/LivestreamContent/index.js +13 -13
- package/lib/module/v4/component/LivestreamContent/index.js.map +1 -1
- package/lib/module/v4/component/LoadingImage/index.js +24 -22
- package/lib/module/v4/component/LoadingImage/index.js.map +1 -1
- package/lib/module/v4/component/LoadingImage/styles.js +2 -19
- package/lib/module/v4/component/LoadingImage/styles.js.map +1 -1
- package/lib/module/v4/component/LoadingVideo/index.js +3 -11
- package/lib/module/v4/component/LoadingVideo/index.js.map +1 -1
- package/lib/module/v4/component/MyStories/StoryCircleItem.js +6 -13
- package/lib/module/v4/component/MyStories/StoryCircleItem.js.map +1 -1
- package/lib/module/v4/component/MyStories/styles.js +0 -5
- package/lib/module/v4/component/MyStories/styles.js.map +1 -1
- package/lib/module/v4/component/PostContent/index.js +4 -4
- package/lib/module/v4/component/PostContent/index.js.map +1 -1
- package/lib/module/v4/component/PostMenu/index.js +2 -2
- package/lib/module/v4/component/PostMenu/index.js.map +1 -1
- package/lib/module/v4/component/RenderTextWithMention/RenderTextWithMention.js +17 -10
- package/lib/module/v4/component/RenderTextWithMention/RenderTextWithMention.js.map +1 -1
- package/lib/module/v4/component/Toast/index.js +4 -4
- package/lib/module/v4/component/Toast/index.js.map +1 -1
- package/lib/module/v4/component/Toast/styles.js +2 -2
- package/lib/module/v4/component/Toast/styles.js.map +1 -1
- package/lib/module/v4/constants/index.js +1 -0
- package/lib/module/v4/constants/index.js.map +1 -1
- package/lib/module/v4/enum/roomStatus.js +8 -0
- package/lib/module/v4/enum/roomStatus.js.map +1 -0
- package/lib/module/v4/hook/index.js +2 -0
- package/lib/module/v4/hook/index.js.map +1 -1
- package/lib/module/v4/hook/useCustomRankingGlobalFeed.js +1 -3
- package/lib/module/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
- package/lib/module/v4/hook/usePostSubscription.js +31 -0
- package/lib/module/v4/hook/usePostSubscription.js.map +1 -0
- package/lib/module/v4/hook/useRoomSubscription.js +15 -0
- package/lib/module/v4/hook/useRoomSubscription.js.map +1 -0
- package/lib/module/v4/index.js +1 -1
- package/lib/module/v4/index.js.map +1 -1
- package/lib/module/v4/stores/slices/toast.js +4 -1
- package/lib/module/v4/stores/slices/toast.js.map +1 -1
- package/lib/typescript/src/components/MediaSection/index.d.ts.map +1 -1
- package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts +1 -2
- package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts.map +1 -1
- package/lib/typescript/src/components/Social/PostList/index.d.ts +1 -3
- package/lib/typescript/src/components/Social/PostList/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Toast/Toast.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/providers/file-provider.d.ts.map +1 -1
- package/lib/typescript/src/screens/LivestreamPlayer/index.d.ts.map +1 -1
- package/lib/typescript/src/svg/svg-xml-list.d.ts +0 -1
- package/lib/typescript/src/svg/svg-xml-list.d.ts.map +1 -1
- package/lib/typescript/src/util/postTypeChecker.d.ts +1 -1
- package/lib/typescript/src/util/postTypeChecker.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts +1 -3
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts +1 -0
- package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.d.ts +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts +8 -0
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts.map +1 -0
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts +70 -2
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts +1 -0
- package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.d.ts +0 -22
- package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/assets/icons/toast.d.ts +3 -3
- package/lib/typescript/src/v4/assets/icons/toast.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/CommunityStories/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/CommunityStories/styles.d.ts +0 -5
- package/lib/typescript/src/v4/component/CommunityStories/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts +1 -1
- package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingImage/index.d.ts +1 -2
- package/lib/typescript/src/v4/component/LoadingImage/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts +0 -21
- package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts +1 -2
- package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/MyStories/StoryCircleItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/MyStories/styles.d.ts +0 -5
- package/lib/typescript/src/v4/component/MyStories/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/PostContent/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/RenderTextWithMention/RenderTextWithMention.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/Toast/styles.d.ts +1 -1
- package/lib/typescript/src/v4/component/Toast/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/constants/index.d.ts +1 -0
- package/lib/typescript/src/v4/constants/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/enum/roomStatus.d.ts +8 -0
- package/lib/typescript/src/v4/enum/roomStatus.d.ts.map +1 -0
- package/lib/typescript/src/v4/hook/index.d.ts +2 -0
- package/lib/typescript/src/v4/hook/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts +3 -0
- package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts.map +1 -1
- package/lib/typescript/src/v4/hook/usePostSubscription.d.ts +4 -0
- package/lib/typescript/src/v4/hook/usePostSubscription.d.ts.map +1 -0
- package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts +4 -0
- package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts.map +1 -0
- package/lib/typescript/src/v4/index.d.ts +1 -0
- package/lib/typescript/src/v4/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/routes/RouteParamList.d.ts +1 -1
- package/lib/typescript/src/v4/routes/RouteParamList.d.ts.map +1 -1
- package/lib/typescript/src/v4/stores/slices/toast.d.ts +1 -0
- package/lib/typescript/src/v4/stores/slices/toast.d.ts.map +1 -1
- package/package.json +6 -3
- package/src/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.tsx +1 -1
- package/src/components/MediaSection/index.tsx +4 -6
- package/src/components/PostTypeChoiceModal/PostTypeChoiceModal.tsx +15 -15
- package/src/components/PostTypeChoiceModal/style.ts +1 -2
- package/src/components/Social/PostList/index.tsx +1 -4
- package/src/components/Toast/Toast.tsx +0 -1
- package/src/index.tsx +2 -2
- package/src/providers/file-provider.tsx +20 -42
- package/src/screens/CreateLivestream/CreateLivestream.tsx +17 -17
- package/src/screens/LivestreamPlayer/index.tsx +9 -15
- package/src/svg/svg-xml-list.ts +1 -7
- package/src/util/postTypeChecker.ts +1 -1
- package/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.tsx +10 -10
- package/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.tsx +1 -1
- package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.tsx +1 -1
- package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.tsx +1 -1
- package/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.ts +3 -2
- package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.tsx +24 -25
- package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.ts +2 -2
- package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.tsx +255 -89
- package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.tsx +48 -0
- package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.ts +72 -3
- package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.tsx +206 -154
- package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.ts +2 -0
- package/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.tsx +0 -46
- package/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.tsx +57 -122
- package/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.ts +1 -23
- package/src/v4/assets/icons/toast.tsx +9 -12
- package/src/v4/component/CommunityStories/index.tsx +17 -26
- package/src/v4/component/CommunityStories/styles.ts +2 -7
- package/src/v4/component/LivestreamContent/index.tsx +21 -22
- package/src/v4/component/LoadingImage/index.tsx +25 -28
- package/src/v4/component/LoadingImage/styles.ts +0 -17
- package/src/v4/component/LoadingVideo/index.tsx +3 -12
- package/src/v4/component/MyStories/StoryCircleItem.tsx +12 -19
- package/src/v4/component/MyStories/styles.ts +0 -5
- package/src/v4/component/PostContent/index.tsx +6 -8
- package/src/v4/component/PostMenu/index.tsx +2 -2
- package/src/v4/component/RenderTextWithMention/RenderTextWithMention.tsx +16 -10
- package/src/v4/component/Toast/index.tsx +1 -1
- package/src/v4/component/Toast/styles.ts +2 -2
- package/src/v4/constants/index.ts +3 -0
- package/src/v4/enum/roomStatus.ts +7 -0
- package/src/v4/hook/index.ts +2 -0
- package/src/v4/hook/useCustomRankingGlobalFeed.ts +1 -1
- package/src/v4/hook/usePostSubscription.ts +34 -0
- package/src/v4/hook/useRoomSubscription.ts +19 -0
- package/src/v4/index.tsx +1 -1
- package/src/v4/routes/RouteParamList.tsx +1 -1
- package/src/v4/stores/slices/toast.ts +5 -0
- package/uikit.config.json +1 -1
- package/lib/commonjs/v4/enum/livestreamStatus.js +0 -13
- package/lib/commonjs/v4/enum/livestreamStatus.js.map +0 -1
- package/lib/module/v4/enum/livestreamStatus.js +0 -7
- package/lib/module/v4/enum/livestreamStatus.js.map +0 -1
- package/lib/typescript/src/v4/enum/livestreamStatus.d.ts +0 -7
- package/lib/typescript/src/v4/enum/livestreamStatus.d.ts.map +0 -1
- 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
|
-
|
|
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
|
-
<
|
|
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
|
-
{
|
|
513
|
-
|
|
514
|
-
<
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
<
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
<
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
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:
|
|
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
|
-
|
|
3
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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
|
-
|
|
18
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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:
|
|
102
|
-
top:
|
|
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,
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
49
|
+
roomId: livestream.roomId,
|
|
50
50
|
});
|
|
51
51
|
}, [livestream, navigation, post]);
|
|
52
52
|
|
|
53
|
-
const getLivestreamThumbnail = async (currentStream: Amity.
|
|
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 =
|
|
75
|
-
|
|
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
|
-
}, [
|
|
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.
|
|
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 ===
|
|
106
|
-
livestream?.status ===
|
|
105
|
+
livestream?.status === RoomStatus.live ||
|
|
106
|
+
livestream?.status === RoomStatus.ended;
|
|
107
107
|
|
|
108
108
|
if (isTerminated && isLiveOrEnded) {
|
|
109
109
|
return (
|
|
110
|
-
<View key={livestream.
|
|
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 ===
|
|
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 ===
|
|
148
|
-
<LiveStreamEndThumbnail />
|
|
149
|
-
)}
|
|
147
|
+
{livestream.status === RoomStatus.ended && <LiveStreamEndThumbnail />}
|
|
150
148
|
|
|
151
|
-
{(livestream.status ===
|
|
152
|
-
livestream.status ===
|
|
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 ===
|
|
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 ===
|
|
166
|
+
{livestream.status === RoomStatus.recorded && (
|
|
168
167
|
<View style={styles.streamStatusRecorded}>
|
|
169
168
|
<Typography.CaptionBold style={styles.streamStatusText}>
|
|
170
169
|
RECORDED
|