This repository was archived by the owner on Apr 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
App bugfixes: map overlay and review thumbs up/down #79
Open
leevi978
wants to merge
2
commits into
develop
Choose a base branch
from
bugfix-review-thumbs
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,861
−1,830
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import React, {Component} from "react"; | ||
| import MapView, {Marker} from "react-native-maps"; | ||
| import {Geolocation} from "react-native"; | ||
| import React, { Component } from "react"; | ||
| import MapView, { Marker } from "react-native-maps"; | ||
| import { Geolocation } from "react-native"; | ||
| import colors from "../settings/defaultStyles"; | ||
|
|
||
| export default class Map extends Component { | ||
|
|
@@ -13,7 +13,7 @@ export default class Map extends Component { | |
| } | ||
|
|
||
| componentDidMount() { | ||
| navigator.geolocation.getCurrentPosition(({coords}) => | ||
| navigator.geolocation.getCurrentPosition(({ coords }) => | ||
| this.map.animateToCoordinate(coords) | ||
| ); | ||
| } | ||
|
|
@@ -47,6 +47,7 @@ export default class Map extends Component { | |
| }} | ||
| onPress={e => { | ||
| this.props.deselectVenue(); | ||
| this.removeMarkers(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| }} | ||
| onPoiClick={e => { | ||
| this.props.onVenueSelect(e.nativeEvent.placeId); | ||
|
|
@@ -67,6 +68,10 @@ export default class Map extends Component { | |
|
|
||
| animateTo(coordinates) { | ||
| this.map.animateToCoordinate(coordinates); | ||
| this.setState({markers: [coordinates]}); | ||
| this.setState({ markers: [coordinates] }); | ||
| } | ||
|
|
||
| removeMarkers() { | ||
| this.setState({ markers: [] }); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,14 +60,13 @@ export default class Review extends Component { | |
| } | ||
|
|
||
| renderProperty(property, review) { | ||
| const {value} = review; | ||
| return ( | ||
| <View key={property.name}> | ||
| <View style={[styles.row, styles.property]}> | ||
| <PropertyTitle property={property} size={22} style={{flex: 1}}/> | ||
| <MaterialIcons | ||
| name={value ? "thumb-up" : "thumb-down"} | ||
| color={value ? colors.positiveColor : colors.negativeColor} | ||
| name={this.reviewIsPositive(review) ? "thumb-up" : "thumb-down"} | ||
| color={this.reviewIsPositive(review) ? colors.positiveColor : colors.negativeColor} | ||
|
Comment on lines
+68
to
+69
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| size={23} | ||
| /> | ||
| </View> | ||
|
|
@@ -86,6 +85,11 @@ export default class Review extends Component { | |
| ); | ||
| } | ||
|
|
||
| reviewIsPositive(review){ | ||
| const {value} = review; | ||
| return (value > 0); | ||
| } | ||
|
|
||
| toggleComments() { | ||
| this.setState({showComments: !this.state.showComments}); | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Løste dette et problem, eller ble det lagt til som en "forsikring" mot at kartet flytter på seg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tru det eller ei, men det løste hele kartproblemet