Skip to content

fix: hide overlay completely when content loads (#160)#161

Merged
Lipo11 merged 1 commit intobirdwingo:mainfrom
marceloams:160-loading-overlay-always-visible-on-transparent-images
Jul 7, 2025
Merged

fix: hide overlay completely when content loads (#160)#161
Lipo11 merged 1 commit intobirdwingo:mainfrom
marceloams:160-loading-overlay-always-visible-on-transparent-images

Conversation

@marceloams
Copy link
Copy Markdown
Contributor

@marceloams marceloams commented Jul 3, 2025

Overview

Fixes loading overlay showing behind transparent images by setting container opacity to 0 after content loads.

Closes #160

Copy link
Copy Markdown
Contributor

@Lipo11 Lipo11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey! the next state is not necessary, i would use reanimated for this like:

const loading = useSharedValue(true);

const containerAnimatedStyle = useAnimatedStyle(() => ({
  opacity: loading.value ? 1 : 0,
}));

return (
  <Animated.View style={[ImageStyles.container, containerAnimatedStyle]}>
    {/* ... */}
  </Animated.View>
);

@marceloams
Copy link
Copy Markdown
Contributor Author

Hey @Lipo11 , you're right, thanks for the feedback! I'm not used to reanimated, this solution does the trick! I'll follow this and update the code.

@Lipo11 Lipo11 merged commit 78649fa into birdwingo:main Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loading overlay always visible on transparent images

2 participants