Merge pull request #547 from MilosKozak/wear-noFakebolusProgressDismiss2

don't show single connection timeouts on the watch
This commit is contained in:
Milos Kozak 2017-12-25 20:44:39 +01:00 committed by GitHub
commit e2f6e6a450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -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);

View file

@ -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();