Commit 976b5361 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'fix-profile-image' into 'master'

Fixed animated profile image having children.

See merge request thalia/ThaliApp-react!102
parents c241759a ad49dd6b
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Linking, ScrollView, Text, View, Animated, TouchableOpacity, Platform, StatusBar } from 'react-native';
import { Linking, ScrollView, Text, View, Animated, TouchableOpacity, Platform, StatusBar, ImageBackground } from 'react-native';
import { connect } from 'react-redux';
import Icon from 'react-native-vector-icons/MaterialIcons';
import LinearGradient from 'react-native-linear-gradient';
......@@ -186,7 +186,7 @@ class Profile extends Component {
return (
<Animated.View style={[styles.header, { height: headerHeight }]}>
<Animated.Image
<Animated.View
style={[
styles.backgroundImage,
{
......@@ -194,10 +194,15 @@ class Profile extends Component {
transform: [{ translateY: imageTranslate }],
},
]}
source={{ uri: this.props.profile.photo }}
>
<LinearGradient colors={['#55000000', '#000000']} style={styles.overlayGradient} />
</Animated.Image>
<ImageBackground
source={{ uri: this.props.profile.photo }}
style={styles.backgroundImage}
resizeMode="cover"
>
<LinearGradient colors={['#55000000', '#000000']} style={styles.overlayGradient} />
</ImageBackground>
</Animated.View>
<Animated.View style={[styles.appBar, appBarBorderStyle]}>
<TouchableOpacity
onPress={this.props.back}
......
......@@ -142,7 +142,6 @@ const styles = create({
right: 0,
width: null,
height: HEADER_MAX_HEIGHT,
resizeMode: 'cover',
},
overlayGradient: {
position: 'absolute',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment