Skip to content

Commit

Permalink
hide camera button on map (#229)
Browse files Browse the repository at this point in the history
* hide all unimplemented UI components for appstore submission

* update RN-maps version and fixed map component life cycle

* update version

* hide camera button on map

* hide camera button on list view
  • Loading branch information
ochanje210 authored Jan 31, 2017
1 parent 2c1c05c commit 544c550
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 27 deletions.
2 changes: 1 addition & 1 deletion ios/GooberProject/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.9</string>
<string>1.0.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
37 changes: 24 additions & 13 deletions shared/components/eventList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ import { ListView, View, Dimensions, Platform } from 'react-native';
import CardLayout from '../containers/cardLayout';
import MapButton from './mapButton';
import { Actions } from 'react-native-router-flux';
import { getLoginType } from './../actions/authActions';

class EventList extends Component {
constructor(props) {
super(props);
this.state = {
loginType: ''
};
getLoginType().then(loginType => {
this.state.loginType = loginType;
});
}

renderRowTxt(rowData) {
Expand Down Expand Up @@ -38,19 +45,23 @@ class EventList extends Component {
enableEmptySections={true} />
: null
}
<MapButton
handleOnPress={this.handleCameraButton.bind(this)}
imageSource={'camera'}
style={Platform.OS === 'android' ? {
position: 'absolute', zIndex: 10, elevation: 4,
bottom: Dimensions.get('window').width * 16 / 360,
right: Dimensions.get('window').width * 16 / 360
} : {
position: 'absolute', zIndex: 10,
bottom: Dimensions.get('window').width * 16 / 360,
right: Dimensions.get('window').width * 16 / 360
}}
/>
{(this.state.loginType === 'facebook') ?
<MapButton
handleOnPress={this.handleCameraButton.bind(this)}
imageSource={'camera'}
style={Platform.OS === 'android' ? {
position: 'absolute', zIndex: 10, elevation: 4,
bottom: Dimensions.get('window').width * 16 / 360,
right: Dimensions.get('window').width * 16 / 360
} : {
position: 'absolute', zIndex: 10,
bottom: Dimensions.get('window').width * 16 / 360,
right: Dimensions.get('window').width * 16 / 360
}}
/>
:
null
}
</View>
);
}
Expand Down
34 changes: 21 additions & 13 deletions shared/components/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import warningClickPng from '../resources/marker/warning_big.png';
import userPng from '../resources/marker/user.png';
import userSmallPng from '../resources/marker/user_small.png';
import {API_GEODATA, API_KEY} from '../utils';
import { getLoginType } from './../actions/authActions';

const styles = StyleSheet.create({
container: {
Expand Down Expand Up @@ -85,9 +86,14 @@ export default class Map extends Component {
itemLength: 0,
itemCategory: '',
items: [],
mapViewHeight: 0
mapViewHeight: 0,
loginType: ''
};
this.watchID = null;

getLoginType().then(loginType => {
this.state.loginType = loginType;
});
}

cardAnimationSlideUp() {
Expand Down Expand Up @@ -410,18 +416,20 @@ export default class Map extends Component {
</Animated.View>
}
{
(this.checkMarkerClicked()) ?
<View style={styles.buttonCameraSection}>
<MapButton
imageSource={'camera'}
handleOnPress={this.handleCameraButton.bind(this)}/>
</View>
:
<Animated.View style={[styles.buttonCameraSection, {bottom: buttonTranslateY}]}>
<MapButton
imageSource={'camera'}
handleOnPress={this.handleCameraButton.bind(this)}/>
</Animated.View>
(this.state.loginType === 'facebook') ?
(this.checkMarkerClicked()) ?
<View style={styles.buttonCameraSection}>
<MapButton
imageSource={'camera'}
handleOnPress={this.handleCameraButton.bind(this)}/>
</View>
:
<Animated.View style={[styles.buttonCameraSection, {bottom: buttonTranslateY}]}>
<MapButton
imageSource={'camera'}
handleOnPress={this.handleCameraButton.bind(this)}/>
</Animated.View>
: null
}
{
(this.checkMarkerClicked()) ? null :
Expand Down

0 comments on commit 544c550

Please sign in to comment.