diff --git a/App.tsx b/App.tsx index e48d7af..309344b 100644 --- a/App.tsx +++ b/App.tsx @@ -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}) => { diff --git a/android/app/build.gradle b/android/app/build.gradle index 79b5aaa..72dab7d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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()) { diff --git a/best.service.ts b/best.service.ts index ad7b6ea..de00467 100644 --- a/best.service.ts +++ b/best.service.ts @@ -19,6 +19,7 @@ export const getLast = async (name: string): Promise => { .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') diff --git a/package.json b/package.json index cfac5a9..f499fc3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "massive", - "version": "1.128", + "version": "1.129", "private": true, "license": "GPL-3.0-only", "scripts": {