@sispheor I have made a minor tweak in your code on my fork to display the mycroft icon just above the title, which in my case I have changed to Mycroft. But I was wondering, any ideas on how I could tweak your code to display the message for an interval based on how long the message is? I played with it a little bit, but I think I’m missing exactly how it works. I tried to add an if statement for example:
for(var i = 0; i < this.messages.length; i++){
var dif = currentDate.getTime() - this.messages[i].timestamp.getTime();
if (this.message.length > 30){
var secondsFromCurrentDateToMessageDate = dif / 1500;
}else{
var secondsFromCurrentDateToMessageDate = dif / 1000;
}
var secondsBetweenDates = Math.abs(secondsFromCurrentDateToMessageDate);
// delete the message if to old
if (secondsBetweenDates > this.config.keep_seconds){
this.messages.splice(i, 1);
}
}
},
But the old messages never get cleaned off the mirror.
Any thoughts about how to increase the time interval that the message is displayed based on the length of the message?
Any help would be much appreciated!
Edit:
Nevermind, I see what I’m doing wrong here. I will work on getting messages to display for different intervals based on how long they are and let you know what I come up with.:face_savouring_delicious_food: