Many of the APIs in the premium Notifications add-on are marked “experimental” and “subject to change or removal.” How accurate is this? It’s a premium add-on…
How often does the icon that gets added via the recommended
Looking at the problem further, I see in NotificationsIndicatorImpl.java there is a reloadCounter() method that gets called by an event listener…
@EventListener(VaadinSessionNotificationEvent.class)
public void handlePushEvent(VaadinSessionNotificationEvent event) {
if (event.isBroadcast()) {
reloadCounter();
} else {
if (currentAuthentication.isSet()) {
UserDetails user = currentAuthentication.getUser();
String username = user.getUsername();
if (username.equals(event.getUsername())) {
reloadCounter();
}
}
}
}
VaadinSessionNotificationEvent is the event published by the in-app notification classes, but this reloadCounter() doesn’t seem to ever happen, or happens on such a delay that I never see it happen in testing.
I have 2 browsers open, one logged in as admin creating notifications for the user logged in on the other browser. The other user’s indicator never updates.
Is there a way to fix this, or can I extend this in some way to make that happen? Or am I missing a configuration parameter somewhere? (Doesn’t seem so though.)
Hi,
It’s seems to be a bug. I’ve created an issue. We’ll try to fix it in the upcoming 1.3.3 release. Your solution with a timer is good and you may use it for now as a workaround.