19 package org.turro.zul.frame;
21 import org.turro.auth.Authentication;
22 import org.turro.message.MessageQueue;
23 import org.turro.plugin.contacts.IContact;
24 import org.zkoss.zk.ui.event.Events;
25 import org.zkoss.zk.ui.util.Clients;
26 import org.zkoss.zul.Timer;
39 private void initTimer() {
41 addEventListener(Events.ON_TIMER, (event) -> {
42 IContact contact = Authentication.getIContact();
43 if(MessageQueue.hasMessage(contact)) {
44 Clients.showNotification(MessageQueue.pollMessage(contact));