mirror of
				https://github.com/house-of-abbey/GarminHomeAssistant.git
				synced 2025-11-04 00:48:14 +00:00 
			
		
		
		
	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:
		@@ -72,8 +72,7 @@ class Settings {
 | 
				
			|||||||
                if (getWebhookId().equals("")) {
 | 
					                if (getWebhookId().equals("")) {
 | 
				
			||||||
                    mWebhookManager = new WebhookManager();
 | 
					                    mWebhookManager = new WebhookManager();
 | 
				
			||||||
                    mWebhookManager.requestWebhookId();
 | 
					                    mWebhookManager.requestWebhookId();
 | 
				
			||||||
                }
 | 
					                } else if (
 | 
				
			||||||
                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)))) {
 | 
				
			||||||
@@ -84,6 +83,7 @@ class Settings {
 | 
				
			|||||||
                if ((System has :ServiceDelegate) and (Background.getTemporalEventRegisteredTime() != null)) {
 | 
					                if ((System has :ServiceDelegate) and (Background.getTemporalEventRegisteredTime() != null)) {
 | 
				
			||||||
                    Background.deleteTemporalEvent();
 | 
					                    Background.deleteTemporalEvent();
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					                removeWebhookId();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (Globals.scDebug) {
 | 
					        if (Globals.scDebug) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user