mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 17:41:57 +01:00
added render property to widget intent
This commit is contained in:
parent
822759c238
commit
98540fbdb6
@ -269,7 +269,8 @@ public class QHybridSupport extends QHybridBaseSupport {
|
|||||||
case QHYBRID_COMMAND_SET_WIDGET_CONTENT: {
|
case QHYBRID_COMMAND_SET_WIDGET_CONTENT: {
|
||||||
String id = String.valueOf(intent.getExtras().get("EXTRA_WIDGET_ID"));
|
String id = String.valueOf(intent.getExtras().get("EXTRA_WIDGET_ID"));
|
||||||
String content = String.valueOf(intent.getExtras().get("EXTRA_CONTENT"));
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,6 +106,6 @@ public abstract class WatchAdapter {
|
|||||||
public void setMusicState(MusicStateSpec stateSpec) {
|
public void setMusicState(MusicStateSpec stateSpec) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWidgetContent(String widgetID, String content) {
|
public void setWidgetContent(String widgetID, String content, boolean render) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setWidgetContent(String widgetID, String content) {
|
public void setWidgetContent(String widgetID, String content, boolean render) {
|
||||||
boolean update = false;
|
boolean update = false;
|
||||||
for(CustomWidget widget : this.widgets){
|
for(CustomWidget widget : this.widgets){
|
||||||
CustomWidgetElement element = widget.getElement(widgetID);
|
CustomWidgetElement element = widget.getElement(widgetID);
|
||||||
@ -195,7 +195,7 @@ public class FossilHRWatchAdapter extends FossilWatchAdapter {
|
|||||||
update = true;
|
update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(update) renderWidgets();
|
if(render && update) renderWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void negotiateSymmetricKey() {
|
private void negotiateSymmetricKey() {
|
||||||
|
Loading…
Reference in New Issue
Block a user