Skip to content

Commit

Permalink
fix rendering alerts without showTime
Browse files Browse the repository at this point in the history
  • Loading branch information
stCarolas committed Feb 6, 2024
1 parent b39552e commit b7d1c05
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/logic/alert/AlertController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,11 @@ export class AlertController {
const showTime = this.findSetting(alert.properties, "imageShowTime", null);
this.alertImageRenderers.forEach((renderer) => {
console.log(alert.properties);
renderer.setImage(
`${process.env.REACT_APP_FILE_API_ENDPOINT}/files/${alert.image}`,
);
renderer.setImage(
`${process.env.REACT_APP_FILE_API_ENDPOINT}/files/${alert.image}`,
);
if (showTime) {
setTimeout(() => renderer.setImage(null), showTime * 1000);
} else {
renderer.setImage(null);
}
renderer.setStyle(
this.calculateImageStyle(
Expand Down Expand Up @@ -283,6 +281,8 @@ export class AlertController {
});
if (showTime) {
setTimeout(() => renderer.setMessage(data.message), showTime * 1000);
} else {
renderer.setMessage(data.message);
}
});
}
Expand Down

0 comments on commit b7d1c05

Please sign in to comment.