[PR] Reusing Lunar messages when already created
Hello Nei,
As discussed on the Matrix channel, it would be great if you can reuse the existing messages in the Lunar Message Section and only update their labels instead of destroying every time.
This also helps to keep their styles intact in Open Bar (tested with latest Open Bar extension.js
on Github).
I have implemented it but could not create a PR (some error) so you can get it here: https://github.com/neuromorph/openbar/blob/main/patches/lunar_extension.js
It mainly just updates the _reloadEvents
method and that is all for Gnome 42 (to 44 I think). For 45+ (I tested in 46) , also need to update the LunarCalendarMessage
to attach titleLabel
and bodyLabel
to this
As per my tests, it retains the functionality as before (e.g. dynamic Holiday message) but of course you would know better.
Let me know if anything.
Thank you.