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:
Brandon Presley 2023-07-04 11:17:58 +12:00
parent a5b6673e9a
commit 0beb1397a6
3 changed files with 15 additions and 13 deletions

View File

@ -79,16 +79,18 @@ export default function EditPlan() {
<StackHeader
title={typeof plan.id === 'number' ? 'Edit plan' : 'Add plan'}
>
<IconButton
color={dark ? 'white' : 'white'}
onPress={async () => {
let first = await getLast(workouts[0])
if (!first) first = { ...defaultSet, name: workouts[0] }
delete first.id
navigation.navigate('StartPlan', { plan: params.plan, first })
}}
icon='play-arrow'
/>
{typeof plan.id === 'number' && (
<IconButton
color={dark ? 'white' : 'white'}
onPress={async () => {
let first = await getLast(workouts[0])
if (!first) first = { ...defaultSet, name: workouts[0] }
delete first.id
navigation.navigate('StartPlan', { plan: params.plan, first })
}}
icon='play-arrow'
/>
)}
</StackHeader>
<View style={{ padding: PADDING, flex: 1 }}>
<ScrollView style={{ flex: 1 }}>

View File

@ -41,8 +41,8 @@ android {
missingDimensionStrategy "RNNotifications.reactNativeVersion", "reactNative60"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 36168
versionName "1.142"
versionCode 36169
versionName "1.143"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
if (isNewArchitectureEnabled()) {

View File

@ -1,6 +1,6 @@
{
"name": "massive",
"version": "1.142",
"version": "1.143",
"private": true,
"license": "GPL-3.0-only",
"scripts": {