Bug fixing

This commit is contained in:
John Lyon-Smith
2018-04-23 14:01:52 -07:00
parent 5cb13f7498
commit 9730c83c9c
26 changed files with 121 additions and 147 deletions

View File

@@ -27,9 +27,9 @@ import { ensurePermissions } from "../App"
import { versionInfo } from "../version"
import { config } from "../config"
import KeyboardSpacer from "react-native-keyboard-spacer"
import hardhatPinImage from "./images/hardhat.png"
import clipboardPinImage from "./images/clipboard.png"
import questionPinImage from "./images/question.png"
import hardhatPinImage from "./images/hardhat-pin.png"
import clipboardPinImage from "./images/clipboard-pin.png"
import questionPinImage from "./images/question-pin.png"
const neverAskForLocationPermissionKeyName = "NeverAskForLocationPermission"
const neverAskForCameraKeyName = "NeverAskForCameraPermission"
@@ -141,7 +141,7 @@ export class Home extends React.Component {
if (this.state.positionInfo) {
const coords = this.state.positionInfo.coords
const workItem = sections[sectionIndex]
const workItem = this.sections[sectionIndex]
const [lng, lat] = workItem.location.coordinates
this.setState({
@@ -159,16 +159,16 @@ export class Home extends React.Component {
@autobind
handleWorkItemsListPress() {
const { positionInfo } = this.state
this.props.history.push(
`/workItemList${
positionInfo
? "?latLng=" +
coords.latitude.toString() +
"," +
coords.longitude.toString()
: ""
}`
)
if (positionInfo) {
const { coords } = positionInfo
this.props.history.push(
`/workItemList?latLng=${coords.latitude},${coords.longitude}`
)
} else {
this.props.history.push("/workItemList")
}
}
@autobind
@@ -184,8 +184,8 @@ export class Home extends React.Component {
@autobind
handleGlassesPress() {
const { lat: lat1, lng: lng1 } = this.state.positionInfo.coords
const closestWorkItem = null
const shortestDistance = config.minDistanceToItem
let closestWorkItem = null
let shortestDistance = config.minDistanceToItem
this.state.sections.forEach((workItem) => {
const [lng2, lat2] = workItem.location.coordinates
@@ -270,7 +270,7 @@ export class Home extends React.Component {
showsBuildings={false}
showsTraffic={false}
showsIndoors={false}
zoomControlEnabled
zoomControlEnabled={false}
region={region}>
{sections.map((workItem, index) => (
<Marker

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB