diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/QHybridSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/QHybridSupport.java index 58808c9a3..0bb4e9eea 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/QHybridSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/QHybridSupport.java @@ -269,7 +269,8 @@ public class QHybridSupport extends QHybridBaseSupport { case QHYBRID_COMMAND_SET_WIDGET_CONTENT: { String id = String.valueOf(intent.getExtras().get("EXTRA_WIDGET_ID")); String content = String.valueOf(intent.getExtras().get("EXTRA_CONTENT")); - watchAdapter.setWidgetContent(id, content); + boolean render = intent.getBooleanExtra("EXTRA_RENDER", true); + watchAdapter.setWidgetContent(id, content, render); break; } } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapter.java index c561f2ea2..a493062b0 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/WatchAdapter.java @@ -106,6 +106,6 @@ public abstract class WatchAdapter { public void setMusicState(MusicStateSpec stateSpec) { } - public void setWidgetContent(String widgetID, String content) { + public void setWidgetContent(String widgetID, String content, boolean render) { } } diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java index fb55b18ef..d2a106370 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/qhybrid/adapter/fossil_hr/FossilHRWatchAdapter.java @@ -185,7 +185,7 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter { } @Override - public void setWidgetContent(String widgetID, String content) { + public void setWidgetContent(String widgetID, String content, boolean render) { boolean update = false; for(CustomWidget widget : this.widgets){ CustomWidgetElement element = widget.getElement(widgetID); @@ -195,7 +195,7 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter { update = true; } - if(update) renderWidgets(); + if(render && update) renderWidgets(); } private void negotiateSymmetricKey() {