diff --git a/App.tsx b/App.tsx index edc33d4..eafab7f 100644 --- a/App.tsx +++ b/App.tsx @@ -55,7 +55,7 @@ const App = () => { const settings = await settingsRepo.findOne({where: {}}) console.log(`${App.name}.useEffect:`, {gotSettings: settings}) setTheme(settings.theme) - setColor(settings.color) + if (settings.color) setColor(settings.color) setInitialized(true) } init() diff --git a/android/app/build.gradle b/android/app/build.gradle index 9d990df..ee8b7cb 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -43,8 +43,8 @@ android { missingDimensionStrategy "RNNotifications.reactNativeVersion", "reactNative60" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 36101 - versionName "1.75" + versionCode 36102 + versionName "1.76" buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() if (isNewArchitectureEnabled()) { diff --git a/migrations/1667186320954-add-color.ts b/migrations/1667186320954-add-color.ts index 52534a9..b4522b7 100644 --- a/migrations/1667186320954-add-color.ts +++ b/migrations/1667186320954-add-color.ts @@ -1,19 +1,10 @@ -import {MigrationInterface, QueryRunner, TableColumn} from 'typeorm' -import {darkColors} from '../colors' +import {MigrationInterface, QueryRunner} from 'typeorm' export class addColor1667186320954 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise { await queryRunner - .addColumn( - 'settings', - new TableColumn({ - name: 'color', - type: 'text', - isNullable: false, - default: `'${darkColors[0]}'`, - }), - ) - .catch(console.error) + .query('ALTER TABLE settings ADD COLUMN color TEXT NULL') + .catch(() => null) } public async down(queryRunner: QueryRunner): Promise { diff --git a/package.json b/package.json index eddda3f..5f22e90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "massive", - "version": "1.75", + "version": "1.76", "private": true, "license": "GPL-3.0-only", "scripts": { diff --git a/settings.ts b/settings.ts index f925efc..065902d 100644 --- a/settings.ts +++ b/settings.ts @@ -21,7 +21,7 @@ export default class Settings { showUnit: boolean @Column('text') - color: string + color?: string @Column('boolean') steps: boolean