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:
parent
a1643c349d
commit
7b401388b5
5
App.tsx
5
App.tsx
|
@ -51,15 +51,14 @@ const App = () => {
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const init = async () => {
|
;(async () => {
|
||||||
if (!AppDataSource.isInitialized) await AppDataSource.initialize()
|
if (!AppDataSource.isInitialized) await AppDataSource.initialize()
|
||||||
const settings = await settingsRepo.findOne({where: {}})
|
const settings = await settingsRepo.findOne({where: {}})
|
||||||
setTheme(settings.theme)
|
setTheme(settings.theme)
|
||||||
if (settings.lightColor) setLightColor(settings.lightColor)
|
if (settings.lightColor) setLightColor(settings.lightColor)
|
||||||
if (settings.darkColor) setDarkColor(settings.darkColor)
|
if (settings.darkColor) setDarkColor(settings.darkColor)
|
||||||
setInitialized(true)
|
setInitialized(true)
|
||||||
}
|
})()
|
||||||
init()
|
|
||||||
const description = DeviceEventEmitter.addListener(
|
const description = DeviceEventEmitter.addListener(
|
||||||
TOAST,
|
TOAST,
|
||||||
({value}: {value: string}) => {
|
({value}: {value: string}) => {
|
||||||
|
|
|
@ -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 36154
|
versionCode 36155
|
||||||
versionName "1.128"
|
versionName "1.129"
|
||||||
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
||||||
|
|
||||||
if (isNewArchitectureEnabled()) {
|
if (isNewArchitectureEnabled()) {
|
||||||
|
|
|
@ -19,6 +19,7 @@ export const getLast = async (name: string): Promise<GymSet> => {
|
||||||
.createQueryBuilder()
|
.createQueryBuilder()
|
||||||
.where('name = :name', {name})
|
.where('name = :name', {name})
|
||||||
.andWhere('reps >= 5')
|
.andWhere('reps >= 5')
|
||||||
|
.andWhere("strftime('%Y-%m-%d', 'now', 'localtime') > created")
|
||||||
.groupBy("STRFTIME('%Y-%m-%d', created)")
|
.groupBy("STRFTIME('%Y-%m-%d', created)")
|
||||||
.orderBy('created', 'DESC')
|
.orderBy('created', 'DESC')
|
||||||
.select('reps')
|
.select('reps')
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "massive",
|
"name": "massive",
|
||||||
"version": "1.128",
|
"version": "1.129",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user