44 Text ,
55 TouchableOpacity ,
66 TextInput ,
7- Animated ,
8- Keyboard ,
97 ActivityIndicator ,
108 StyleSheet
119} from 'react-native'
@@ -26,43 +24,12 @@ export default class Profile extends Component {
2624 isLoading : false ,
2725 isFromFile : false
2826 }
29- // this.size = new Animated.Value(150)
3027 }
3128
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- // }
42-
43- // componentWillUnmount() {
44- // this.keyboardWillShowSub.remove()
45- // this.keyboardWillHideSub.remove()
46- // }
47-
4829 componentDidMount ( ) {
4930 this . props . User . getCurrentUser ( )
5031 }
5132
52- // keyboardWillShow = event => {
53- // Animated.timing(this.size, {
54- // duration: 100,
55- // toValue: 75
56- // }).start()
57- // }
58-
59- // keyboardWillHide = event => {
60- // Animated.timing(this.size, {
61- // duration: 100,
62- // toValue: 150
63- // }).start()
64- // }
65-
6633 render ( ) {
6734 return (
6835 < View style = { [ style . container , _style . container ] } >
@@ -128,7 +95,7 @@ export default class Profile extends Component {
12895 } )
12996 } )
13097 } else {
131- this . props . User . update ( ) . then ( data => {
98+ this . props . User . update ( ) . then ( ( ) => {
13299 saveKey ( this . props . User . key ) . then ( ( ) => {
133100 this . props . navigation . replace ( 'Splash' )
134101 } )
@@ -139,11 +106,11 @@ export default class Profile extends Component {
139106 selectAvatar = ( ) => {
140107 ImagePicker . showImagePicker ( null , response => {
141108 if ( response . didCancel ) {
142- console . log ( 'User cancelled image picker' )
109+ // console.log('User cancelled image picker')
143110 } else if ( response . error ) {
144- console . log ( 'ImagePicker Error: ' , response . error )
111+ // console.log('ImagePicker Error: ', response.error)
145112 } else if ( response . customButton ) {
146- console . log ( 'User tapped custom button: ' , response . customButton )
113+ // console.log('User tapped custom button: ', response.customButton)
147114 } else {
148115 this . props . User . avatarSource = response . path
149116 this . props . User . fileName = response . fileName
0 commit comments