Hide play button from new plans - 1.143
It doesn't make sense to start a plan that hasn't been created yet.
This commit is contained in:
parent
a5b6673e9a
commit
0beb1397a6
22
EditPlan.tsx
22
EditPlan.tsx
|
@ -79,16 +79,18 @@ export default function EditPlan() {
|
||||||
<StackHeader
|
<StackHeader
|
||||||
title={typeof plan.id === 'number' ? 'Edit plan' : 'Add plan'}
|
title={typeof plan.id === 'number' ? 'Edit plan' : 'Add plan'}
|
||||||
>
|
>
|
||||||
<IconButton
|
{typeof plan.id === 'number' && (
|
||||||
color={dark ? 'white' : 'white'}
|
<IconButton
|
||||||
onPress={async () => {
|
color={dark ? 'white' : 'white'}
|
||||||
let first = await getLast(workouts[0])
|
onPress={async () => {
|
||||||
if (!first) first = { ...defaultSet, name: workouts[0] }
|
let first = await getLast(workouts[0])
|
||||||
delete first.id
|
if (!first) first = { ...defaultSet, name: workouts[0] }
|
||||||
navigation.navigate('StartPlan', { plan: params.plan, first })
|
delete first.id
|
||||||
}}
|
navigation.navigate('StartPlan', { plan: params.plan, first })
|
||||||
icon='play-arrow'
|
}}
|
||||||
/>
|
icon='play-arrow'
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</StackHeader>
|
</StackHeader>
|
||||||
<View style={{ padding: PADDING, flex: 1 }}>
|
<View style={{ padding: PADDING, flex: 1 }}>
|
||||||
<ScrollView style={{ flex: 1 }}>
|
<ScrollView style={{ flex: 1 }}>
|
||||||
|
|
|
@ -41,8 +41,8 @@ android {
|
||||||
missingDimensionStrategy "RNNotifications.reactNativeVersion", "reactNative60"
|
missingDimensionStrategy "RNNotifications.reactNativeVersion", "reactNative60"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 36168
|
versionCode 36169
|
||||||
versionName "1.142"
|
versionName "1.143"
|
||||||
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
||||||
|
|
||||||
if (isNewArchitectureEnabled()) {
|
if (isNewArchitectureEnabled()) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "massive",
|
"name": "massive",
|
||||||
"version": "1.142",
|
"version": "1.143",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in New Issue