mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 11:26:47 +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: {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
}
|
||||
}
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user