Merge pull request #547 from MilosKozak/wear-noFakebolusProgressDismiss2
don't show single connection timeouts on the watch
This commit is contained in:
commit
e2f6e6a450
|
@ -215,6 +215,8 @@ public class WearPlugin implements PluginBase {
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onStatusEvent(final EventDismissBolusprogressIfRunning ev) {
|
public void onStatusEvent(final EventDismissBolusprogressIfRunning ev) {
|
||||||
|
if(ev.result == null) return;
|
||||||
|
|
||||||
String status;
|
String status;
|
||||||
if(ev.result.success){
|
if(ev.result.success){
|
||||||
status = MainApp.sResources.getString(R.string.success);
|
status = MainApp.sResources.getString(R.string.success);
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class QueueThread extends Thread {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pump.isConnected() && secondsElapsed > Constants.PUMP_MAX_CONNECTION_TIME_IN_SECONDS) {
|
if (!pump.isConnected() && secondsElapsed > Constants.PUMP_MAX_CONNECTION_TIME_IN_SECONDS) {
|
||||||
MainApp.bus().post(new EventDismissBolusprogressIfRunning(new PumpEnactResult()));
|
MainApp.bus().post(new EventDismissBolusprogressIfRunning(null));
|
||||||
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.connectiontimedout)));
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.connectiontimedout)));
|
||||||
log.debug("QUEUE: timed out");
|
log.debug("QUEUE: timed out");
|
||||||
pump.stopConnecting();
|
pump.stopConnecting();
|
||||||
|
|
Loading…
Reference in a new issue