From cc6b37e16a85c6d332208caa0abb74ffa663c23d Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Wed, 15 Nov 2023 19:25:27 +1300 Subject: [PATCH] =?UTF-8?q?Fix=20timer=20not=20always=20ending=20-=202.3?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This bug is because I mis-named the event for the alarm finishing. It would only be possible to create this bug if you do the following: 1. Create a timer 2. Swap to another app for it's duration and keep your phone screen active 3. On timer completion, without tapping the notification, focus the app 4. See the timer has not been set to zero --- android/app/build.gradle | 4 ++-- android/app/src/main/java/com/massive/AlarmModule.kt | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index dbfe153..636592e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -85,8 +85,8 @@ android { applicationId "com.massive" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 36217 - versionName "2.2" + versionCode 36218 + versionName "2.3" } signingConfigs { release { diff --git a/android/app/src/main/java/com/massive/AlarmModule.kt b/android/app/src/main/java/com/massive/AlarmModule.kt index fb87125..362ec21 100644 --- a/android/app/src/main/java/com/massive/AlarmModule.kt +++ b/android/app/src/main/java/com/massive/AlarmModule.kt @@ -144,7 +144,7 @@ class AlarmModule constructor(context: ReactApplicationContext?) : context.startForegroundService(Intent(context, AlarmService::class.java)) context .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java) - .emit("finish", Arguments.createMap().apply { + .emit("tick", Arguments.createMap().apply { putString("minutes", "00") putString("seconds", "00") }) diff --git a/package.json b/package.json index 42164a7..5a58bf0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "massive", - "version": "2.2", + "version": "2.3", "private": true, "license": "GPL-3.0-only", "scripts": {