This commit is contained in:
parent
81ff54af6b
commit
01739a2ad7
|
@ -15,7 +15,7 @@ export var locEnabled:boolean = false;
|
|||
const displayBeat:number = 3;
|
||||
|
||||
const geoLibAccuracy:number = 0.1;
|
||||
const minExpoAccuracy:number = 10;
|
||||
const minExpoAccuracy:number = .01;
|
||||
|
||||
export function getEndIsLast() : boolean { return endIsNigh; }
|
||||
export function setEndIsLast(value:boolean) { endIsNigh = value; }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"expo": {
|
||||
"name": "GT2 Green Travel Carbon App",
|
||||
"slug": "GT2standalone",
|
||||
"version": "2.0.5",
|
||||
"version": "2.0.6",
|
||||
"orientation": "default",
|
||||
"description": "Travel Carbon Footprint (simplified version)",
|
||||
"icon": "./assets/images/icon.png",
|
||||
|
|
|
@ -61,7 +61,7 @@ export function ScreenInfo3() {
|
|||
style={styles.titleText}
|
||||
lightColor="rgba(0,0,0,0.8)"
|
||||
darkColor="rgba(255,255,255,0.8)">
|
||||
Green Travel Calculator v. 2.0.5
|
||||
Green Travel Calculator v. 2.0.6
|
||||
</Text>
|
||||
<Text
|
||||
style={styles.versionText}
|
||||
|
|
|
@ -3,7 +3,7 @@ import { useState } from 'react';
|
|||
import { Alert, BackHandler, Button, StyleSheet } from 'react-native';
|
||||
import { Text, View } from '../components/Themed';
|
||||
import { ScreenInfo2 } from '../components/ScreenInfo';
|
||||
import { locEnabled, TripDisplay, LastTrip, Trips } from '../GT2';
|
||||
import { locEnabled, TripDisplay, LastTrip, Trips, setEndIsLast } from '../GT2';
|
||||
import { RootTabScreenProps } from '../types';
|
||||
import { getAdvised, setAdvised } from './ModalScreen';
|
||||
|
||||
|
@ -72,12 +72,12 @@ export default function TripScreen( { navigation }: RootTabScreenProps<'Trip'>)
|
|||
title={sButtonText}
|
||||
onPress={() => {
|
||||
if (!getAdvised()) {
|
||||
Alert.alert("Note:GT2 2.0.n doesn't run in background.");
|
||||
Alert.alert("Note: GT2 2.0.n doesn't while run in background.");
|
||||
setAdvised();
|
||||
}
|
||||
if (!Trips.inProgress) {startTrip();
|
||||
if (Trips.inProgress) { setSButtonText("End"); setPButtonText('Pause');}}
|
||||
else {setSButtonText('Start'); endTrip(); navigation.push('Modal'); }}
|
||||
else {setSButtonText('Start'); LastTrip.from(Trips); endTrip(); navigation.push('Modal'); }}
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
|
@ -102,7 +102,7 @@ export default function TripScreen( { navigation }: RootTabScreenProps<'Trip'>)
|
|||
title={sButtonText}
|
||||
onPress={() => {
|
||||
if (!getAdvised()) {
|
||||
Alert.alert("Note:GT2 2.0.n doesn't run in background.");
|
||||
Alert.alert("Note: GT2 2.0.n doesn't run while in background.");
|
||||
setAdvised();
|
||||
}
|
||||
if (!Trips.inProgress) {startTrip();
|
||||
|
@ -120,7 +120,7 @@ export default function TripScreen( { navigation }: RootTabScreenProps<'Trip'>)
|
|||
</View>
|
||||
<TripDisplay></TripDisplay>
|
||||
<View>
|
||||
<Button title={'Show Last Trip'} onPress={() => { navigation.push('Modal'); } } />
|
||||
<Button title={'Show Last Trip'} onPress={() => { setEndIsLast(true); navigation.push('Modal'); } } />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{
|
||||
"extends": "expo/tsconfig.base",
|
||||
"compilerOptions": {
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
|
|
Loading…
Reference in New Issue