Get last now excludes todays sets - 1.129

Otherwise the minute you enter something it
becomes the last set. Much more useful to be
showing yesterdays working set instead.
This commit is contained in:
Brandon Presley 2023-03-06 18:26:44 +13:00
parent a1643c349d
commit 7b401388b5
4 changed files with 6 additions and 6 deletions

View File

@ -51,15 +51,14 @@ const App = () => {
)
useEffect(() => {
const init = async () => {
;(async () => {
if (!AppDataSource.isInitialized) await AppDataSource.initialize()
const settings = await settingsRepo.findOne({where: {}})
setTheme(settings.theme)
if (settings.lightColor) setLightColor(settings.lightColor)
if (settings.darkColor) setDarkColor(settings.darkColor)
setInitialized(true)
}
init()
})()
const description = DeviceEventEmitter.addListener(
TOAST,
({value}: {value: string}) => {

View File

@ -41,8 +41,8 @@ android {
missingDimensionStrategy "RNNotifications.reactNativeVersion", "reactNative60"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 36154
versionName "1.128"
versionCode 36155
versionName "1.129"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
if (isNewArchitectureEnabled()) {

View File

@ -19,6 +19,7 @@ export const getLast = async (name: string): Promise<GymSet> => {
.createQueryBuilder()
.where('name = :name', {name})
.andWhere('reps >= 5')
.andWhere("strftime('%Y-%m-%d', 'now', 'localtime') > created")
.groupBy("STRFTIME('%Y-%m-%d', created)")
.orderBy('created', 'DESC')
.select('reps')

View File

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