Merge pull request #54 from house-of-abbey/restyled/51-use-webhooks-for-reporting-battery-levels

Restyle Use webhooks for reporting battery
This commit is contained in:
Joseph Abbey
2024-01-10 23:12:45 +00:00
committed by GitHub
3 changed files with 5 additions and 5 deletions

View File

@ -15,10 +15,10 @@
<properties> <properties>
<property id="api_key" type="string"></property> <property id="api_key" type="string"></property>
<!-- <!--
The webhook ID is the last part of the webhook URL. The webhook ID is the last part of the webhook URL.
It is secret and should not be shared. It is secret and should not be shared.
It will not be set in settings but will be It will not be set in settings but will be
generated by the application and stored in generated by the application and stored in
persistent storage. persistent storage.
--> -->
@ -84,4 +84,4 @@
--> -->
<property id="battery_level_refresh_rate" type="number">15</property> <property id="battery_level_refresh_rate" type="number">15</property>
</properties> </properties>

View File

@ -113,4 +113,4 @@
> >
<settingConfig type="alphaNumeric" /> <settingConfig type="alphaNumeric" />
</setting> </setting>
</settings> </settings>

View File

@ -177,7 +177,7 @@ class Settings {
mWebhookManager = new WebhookManager(); mWebhookManager = new WebhookManager();
mWebhookManager.requestWebhookId(); mWebhookManager.requestWebhookId();
} }
if (!getWebhookId().equals("") and if (!getWebhookId().equals("") and
(System has :ServiceDelegate) and (System has :ServiceDelegate) and
((Background.getTemporalEventRegisteredTime() == null) or ((Background.getTemporalEventRegisteredTime() == null) or
(Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60)))) { (Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60)))) {