Optimize batteries after importing database - 1.125

Closes #151
This commit is contained in:
Brandon Presley 2023-02-14 16:48:31 +13:00
parent f4db61aeec
commit a84cab6bbf
3 changed files with 10 additions and 4 deletions

View File

@ -235,7 +235,13 @@ export default function SettingsPage() {
await AppDataSource.initialize() await AppDataSource.initialize()
await setRepo.createQueryBuilder().update().set({image: null}).execute() await setRepo.createQueryBuilder().update().set({image: null}).execute()
await update('sound', null) await update('sound', null)
reset({index: 0, routes: [{name: 'Settings'}]}) NativeModules.SettingsModule.ignoringBattery(
async (isIgnoring: boolean) => {
const {alarm} = await settingsRepo.findOne({where: {}})
if (alarm && !isIgnoring) NativeModules.SettingsModule.ignoreBattery()
reset({index: 0, routes: [{name: 'Settings'}]})
},
)
}, [reset, update]) }, [reset, update])
const exportDatabase = useCallback(async () => { const exportDatabase = useCallback(async () => {

View File

@ -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 36150 versionCode 36151
versionName "1.124" versionName "1.125"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
if (isNewArchitectureEnabled()) { if (isNewArchitectureEnabled()) {

View File

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