Skip to content

Commit b425a04

Browse files
add comment
1 parent d861c92 commit b425a04

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/core/src/js/feedback/FeedbackWidgetManager.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ class FeedbackWidgetProvider extends React.Component<FeedbackWidgetProviderProps
164164
}
165165

166166
private _setVisibilityFunction = (visible: boolean): void => {
167-
const updateState = () => {
168-
this.setState({ isVisible: visible });
169-
};
170-
171167
Animated.parallel([
172168
Animated.timing(this.state.panY, {
173169
toValue: Dimensions.get('screen').height,
@@ -180,7 +176,9 @@ class FeedbackWidgetProvider extends React.Component<FeedbackWidgetProviderProps
180176
useNativeDriver: true,
181177
})
182178
]).start(() => {
183-
updateState();
179+
// Change of the state unmount the component
180+
// which would cancel the animation
181+
this.setState({ isVisible: visible });
184182
});
185183
};
186184

0 commit comments

Comments
 (0)