@@ -12,6 +12,7 @@ import {
1212import ImagePicker from 'react-native-image-picker'
1313import { inject , observer } from 'mobx-react'
1414
15+ import ProgressiveImage from '../components/progressiveImage'
1516import style from '../theme/index'
1617import colors from '../theme/colors'
1718import { saveKey } from '../utils/db'
@@ -25,42 +26,42 @@ export default class Profile extends Component {
2526 isLoading : false ,
2627 isFromFile : false
2728 }
28- this . size = new Animated . Value ( 150 )
29+ // this.size = new Animated.Value(150)
2930 }
3031
31- componentWillMount ( ) {
32- this . keyboardWillShowSub = Keyboard . addListener (
33- 'keyboardDidShow' ,
34- this . keyboardWillShow
35- )
36- this . keyboardWillHideSub = Keyboard . addListener (
37- 'keyboardDidHide' ,
38- this . keyboardWillHide
39- )
40- }
32+ // componentWillMount() {
33+ // this.keyboardWillShowSub = Keyboard.addListener(
34+ // 'keyboardDidShow',
35+ // this.keyboardWillShow
36+ // )
37+ // this.keyboardWillHideSub = Keyboard.addListener(
38+ // 'keyboardDidHide',
39+ // this.keyboardWillHide
40+ // )
41+ // }
4142
42- componentWillUnmount ( ) {
43- this . keyboardWillShowSub . remove ( )
44- this . keyboardWillHideSub . remove ( )
45- }
43+ // componentWillUnmount() {
44+ // this.keyboardWillShowSub.remove()
45+ // this.keyboardWillHideSub.remove()
46+ // }
4647
4748 componentDidMount ( ) {
4849 this . props . User . getCurrentUser ( )
4950 }
5051
51- keyboardWillShow = event => {
52- Animated . timing ( this . size , {
53- duration : 100 ,
54- toValue : 75
55- } ) . start ( )
56- }
52+ // keyboardWillShow = event => {
53+ // Animated.timing(this.size, {
54+ // duration: 100,
55+ // toValue: 75
56+ // }).start()
57+ // }
5758
58- keyboardWillHide = event => {
59- Animated . timing ( this . size , {
60- duration : 100 ,
61- toValue : 150
62- } ) . start ( )
63- }
59+ // keyboardWillHide = event => {
60+ // Animated.timing(this.size, {
61+ // duration: 100,
62+ // toValue: 150
63+ // }).start()
64+ // }
6465
6566 render ( ) {
6667 return (
@@ -69,8 +70,8 @@ export default class Profile extends Component {
6970 style = { [ _style . avatar , { backgroundColor : '#fff' , elevation : 15 } ] }
7071 onPress = { this . selectAvatar }
7172 >
72- < Animated . Image
73- style = { [ _style . avatar , { height : this . size , width : this . size } ] }
73+ < ProgressiveImage
74+ style = { [ _style . avatar ] }
7475 source = {
7576 this . props . User . avatarSource !== ''
7677 ? {
@@ -80,6 +81,7 @@ export default class Profile extends Component {
8081 }
8182 : require ( '../img/profile.png' )
8283 }
84+ thumbnail = { require ( '../img/profile.png' ) }
8385 />
8486 </ TouchableOpacity >
8587 < TextInput
@@ -96,24 +98,23 @@ export default class Profile extends Component {
9698 style = { { margin : 24 } }
9799 />
98100 ) : (
99- < View />
101+ < View
102+ style = { {
103+ backgroundColor : colors . primary ,
104+ alignSelf : 'center' ,
105+ padding : 8 ,
106+ paddingRight : 32 ,
107+ paddingLeft : 32 ,
108+ borderRadius : 6
109+ } }
110+ >
111+ < TouchableOpacity onPress = { this . onSaveOrUpdate } >
112+ < Text style = { [ style . footerButtonText , { fontWeight : '500' } ] } >
113+ Continue
114+ </ Text >
115+ </ TouchableOpacity >
116+ </ View >
100117 ) }
101- < View
102- style = { {
103- backgroundColor : colors . primary ,
104- alignSelf : 'center' ,
105- padding : 8 ,
106- paddingRight : 32 ,
107- paddingLeft : 32 ,
108- borderRadius : 6
109- } }
110- >
111- < TouchableOpacity onPress = { this . onSaveOrUpdate } >
112- < Text style = { [ style . footerButtonText , { fontWeight : '500' } ] } >
113- Continue
114- </ Text >
115- </ TouchableOpacity >
116- </ View >
117118 </ View >
118119 )
119120 }
0 commit comments