From 5fb0fe62f49c1da050c724c1a566b0167fff0e45 Mon Sep 17 00:00:00 2001 From: TebbeUbben Date: Sun, 17 Feb 2019 21:58:17 +0100 Subject: [PATCH] Remove timeout during handshake notification when connection was successful --- .../plugins/PumpInsightLocal/LocalInsightPlugin.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsightLocal/LocalInsightPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsightLocal/LocalInsightPlugin.java index ece7113877..5365ca7601 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsightLocal/LocalInsightPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpInsightLocal/LocalInsightPlugin.java @@ -1535,8 +1535,10 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con @Override public void onStateChanged(InsightState state) { - if (state == InsightState.CONNECTED) statusLoaded = false; - else if (state == InsightState.NOT_PAIRED) { + if (state == InsightState.CONNECTED) { + statusLoaded = false; + MainApp.bus().post(new EventDismissNotification(Notification.INSIGHT_TIMEOUT_DURING_HANDSHAKE)); + } else if (state == InsightState.NOT_PAIRED) { connectionService.withdrawConnectionRequest(this); statusLoaded = false; profileBlocks = null;