Resolves #245 Add special row elements support for entities card

This commit is contained in:
estevez-dev
2019-03-13 00:56:57 +02:00
parent a08a056cff
commit cb118b599a
7 changed files with 168 additions and 56 deletions

View File

@ -14,7 +14,7 @@ class EntityWrapper {
String displayName,
this.uiAction
}) {
if (!entity.missed) {
if (entity.statelessType == StatelessEntityType.NONE || entity.statelessType == StatelessEntityType.CALL_SERVICE || entity.statelessType == StatelessEntityType.WEBLINK) {
this.icon = icon ?? entity.icon;
this.displayName = displayName ?? entity.displayName;
if (uiAction == null) {
@ -51,6 +51,16 @@ class EntityWrapper {
break;
}
case EntityUIAction.navigate: {
if (uiAction.tapService.startsWith("/")) {
//TODO handle local urls
Logger.w("Local urls is not supported yet");
} else {
HAUtils.launchURL(uiAction.tapService);
}
break;
}
default: {
break;
}
@ -81,6 +91,16 @@ class EntityWrapper {
break;
}
case EntityUIAction.navigate: {
if (uiAction.holdService.startsWith("/")) {
//TODO handle local urls
Logger.w("Local urls is not supported yet");
} else {
HAUtils.launchURL(uiAction.holdService);
}
break;
}
default: {
break;
}