registerToadlets();
/* notification templates. */
Template startupNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/startupNotification.html"));
final TemplateNotification startupNotification = new TemplateNotification("startup-notification", startupNotificationTemplate);
notificationManager.addNotification(startupNotification);
ticker.schedule(new Runnable() {
@Override
public void run() {
startupNotification.dismiss();
}
}, 2, TimeUnit.MINUTES);
Template wotMissingNotificationTemplate = TemplateParser.parse(createReader("/templates/notify/wotMissingNotification.html"));
final TemplateNotification wotMissingNotification = new TemplateNotification("wot-missing-notification", wotMissingNotificationTemplate);
ticker.scheduleAtFixedRate(new Runnable() {
@Override
@SuppressWarnings("synthetic-access")
public void run() {
if (getCore().getIdentityManager().isConnected()) {
wotMissingNotification.dismiss();
} else {
notificationManager.addNotification(wotMissingNotification);
}
}