-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch react-native-stories-view@1.0.9 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-stories-view/src/stories/StoryContainer.tsx b/node_modules/react-native-stories-view/src/stories/StoryContainer.tsx
index 7abad0d..7439285 100644
--- a/node_modules/react-native-stories-view/src/stories/StoryContainer.tsx
+++ b/node_modules/react-native-stories-view/src/stories/StoryContainer.tsx
@@ -30,8 +30,8 @@ const StoryContainer = (props: StoryContainerProps) => {
useEffect(() => {
// Alert.prompt("Called")
- setProgressIndex(progressIndex);
- }, [props.enableProgress]);
+ if(props.enableProgress ){ setProgressIndex(0); }
+ }, [props.enableProgress, props.toggleProgressFromStart]);
useEffect(() => {
let listener1 = Keyboard.addListener("keyboardDidShow", onShowKeyboard);
@@ -149,7 +149,7 @@ const StoryContainer = (props: StoryContainerProps) => {
duration={props.duration ? props.duration : DEFAULT_DURATION}
barStyle={props.barStyle}
progressIndex={progressIndex}
- onChange={(position: number) => onChange(position)}
+ onChange={onChange}
/>
</View>
</View>
diff --git a/node_modules/react-native-stories-view/src/utils/interfaceHelper.tsx b/node_modules/react-native-stories-view/src/utils/interfaceHelper.tsx
index 45ddbad..5b3191d 100644
--- a/node_modules/react-native-stories-view/src/utils/interfaceHelper.tsx
+++ b/node_modules/react-native-stories-view/src/utils/interfaceHelper.tsx
@@ -23,7 +23,7 @@ export interface StoryContainerProps extends CommonProps {
isShowReply?: boolean | undefined,
duration?: number | undefined,
barStyle?: BarStyleProps | undefined,
-
+ toggleProgressFromStart?: boolean | undefined,
headerComponent?: FunctionComponentElement<CommonProps> | undefined
userProfile?: UserProps | undefined
This issue body was partially generated by patch-package.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels