birdwingo / react-native-instagram-stories

🚀 Instagram stories is a versatile React Native component designed to display a horizontal scrollable list of user stories, similar to the stories feature found in the Instagram app.
https://birdwingo.com
MIT License
131 stars 35 forks source link

Ability to Start Playing Stories from a Specific Story Index #113

Closed Adil7767 closed 4 weeks ago

Adil7767 commented 2 months ago

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.

Adil7767 commented 1 month 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,

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,