Skip to content

Commit db4248f

Browse files
authored
fix: center align the image loading indicator (#1593)
1 parent 83bac0c commit db4248f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

package/src/components/Attachment/Gallery.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ const styles = StyleSheet.create({
6262
left: 4,
6363
position: 'absolute',
6464
},
65+
imageLoadingIndicatorContainer: {
66+
height: '100%',
67+
justifyContent: 'center',
68+
position: 'absolute',
69+
width: '100%',
70+
},
6571
imageLoadingIndicatorStyle: {
6672
alignItems: 'center',
6773
justifyContent: 'center',
@@ -490,7 +496,7 @@ const GalleryImageThumbnail = <
490496
uri={thumbnail.url}
491497
/>
492498
{isLoadingImage && (
493-
<View style={{ position: 'absolute' }}>
499+
<View style={[styles.imageLoadingIndicatorContainer]}>
494500
<ImageLoadingIndicator style={styles.imageLoadingIndicatorStyle} />
495501
</View>
496502
)}

0 commit comments

Comments
 (0)