Closed Adil7767 closed 4 weeks ago
to fix this i have made some changes in package add these changes and update the package changes are diff --git a/node_modules/@birdwingo/react-native-instagram-stories/src/components/InstagramStories/index.tsx b/node_modules/@birdwingo/react-native-instagram-stories/src/components/InstagramStories/index.tsx index ab743de..4a3f991 100644 --- a/node_modules/@birdwingo/react-native-instagram-stories/src/components/InstagramStories/index.tsx +++ b/node_modules/@birdwingo/react-native-instagram-stories/src/components/InstagramStories/index.tsx @@ -175,6 +175,7 @@ const InstagramStories = forwardRef<InstagramStoriesPublicMethods, InstagramStor
},
clearProgressStorage,
goToSpecificStory:(userId:string,index:number)=>modalRef.current?.goToSpecificStory(userId,index),
hide: () => modalRef.current?.hide(),
show: ( id ) => {diff --git a/node_modules/@birdwingo/react-native-instagram-stories/src/components/Modal/index.tsx b/node_modules/@birdwingo/react-native-instagram-stories/src/components/Modal/index.tsx index 873c3b9..aa0b336 100644 --- a/node_modules/@birdwingo/react-native-instagram-stories/src/components/Modal/index.tsx +++ b/node_modules/@birdwingo/react-native-instagram-stories/src/components/Modal/index.tsx @@ -117,6 +117,7 @@ const StoryModal = forwardRef<StoryModalPublicMethods, StoryModalProps>( ( {
};
+ const scrollTo = ( id: string, animated = true, @@ -423,6 +424,8 @@ const StoryModal = forwardRef<StoryModalPublicMethods, StoryModalProps>( ( { getCurrentStory: () => ( { userId: userId.value, storyId: currentStory.value } ), goToPreviousStory: toPreviousStory, goToNextStory: toNextStory,
goToSpecificStory:(userId:string,index:number)=>{scrollTo(userId, true, false, undefined, index)},
// (userId: string, index: number) => scrollTo(userId, true, false, undefined, index), } ), [ userId.value, currentStory.value ] );
useEffect( () => { @@ -507,3 +510,7 @@ const StoryModal = forwardRef<StoryModalPublicMethods, StoryModalProps>( ( { } );
export default memo( StoryModal ); +function scrollTo(id: string, arg1: boolean, arg2: boolean, undefined: undefined, index: number | undefined) {
diff --git a/node_modules/@birdwingo/react-native-instagram-stories/src/core/dto/componentsDTO.ts b/node_modules/@birdwingo/react-native-instagram-stories/src/core/dto/componentsDTO.ts index f19479e..f915fb2 100644 --- a/node_modules/@birdwingo/react-native-instagram-stories/src/core/dto/componentsDTO.ts +++ b/node_modules/@birdwingo/react-native-instagram-stories/src/core/dto/componentsDTO.ts @@ -62,6 +62,10 @@ export type StoryModalPublicMethods = { goToPreviousStory: () => void; goToNextStory: () => void; getCurrentStory: () => { userId?: string, storyId?: string };
)=>void;
};
export type GestureContext = {
diff --git a/node_modules/@birdwingo/react-native-instagram-stories/src/core/dto/instagramStoriesDTO.ts b/node_modules/@birdwingo/react-native-instagram-stories/src/core/dto/instagramStoriesDTO.ts
index 7020e4f..5827372 100644
--- a/node_modules/@birdwingo/react-native-instagram-stories/src/core/dto/instagramStoriesDTO.ts
+++ b/node_modules/@birdwingo/react-native-instagram-stories/src/core/dto/instagramStoriesDTO.ts
@@ -93,4 +93,8 @@ export type InstagramStoriesPublicMethods = {
goToPreviousStory: () => void;
goToNextStory: () => void;
getCurrentStory: () => { userId?: string, storyId?: string };
};
@LukasFridmansky
I would like to request a feature that allows users to start playing stories from a specific story index. Currently, once you close the stories modal, the playback always begins from the first story. It would be beneficial to have an option where users can select a specific story to start from, especially after they have already watched some stories.
Use Case:
Imagine a user has watched the first 5 stories in the list and then closes the stories modal. When the user reopens the modal, instead of starting from the beginning, they want to start watching from a specific story, such as the story at index 9.
Feature Request:
Provide an option to allow users to select a specific story from the list of stories. When a story is selected, the playback should start from that story and continue forward.