Merge pull request #69 from house-of-abbey/68-automatically-remove-the-webhook-id-when-battery-level-is-disabled

Automatically remove webhook id
This commit is contained in:
Philip Abbey
2024-01-12 17:57:46 +00:00
committed by GitHub

View File

@ -72,8 +72,7 @@ class Settings {
if (getWebhookId().equals("")) {
mWebhookManager = new WebhookManager();
mWebhookManager.requestWebhookId();
}
if (!getWebhookId().equals("") and
} else if (
(System has :ServiceDelegate) and
((Background.getTemporalEventRegisteredTime() == null) or
(Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60)))) {
@ -84,6 +83,7 @@ class Settings {
if ((System has :ServiceDelegate) and (Background.getTemporalEventRegisteredTime() != null)) {
Background.deleteTemporalEvent();
}
removeWebhookId();
}
}
if (Globals.scDebug) {