- if (currentSone != null) {
- templateContext.set("auto-follow", currentSone.getOptions().isAutoFollow());
- templateContext.set("enable-sone-insert-notifications", currentSone.getOptions().isSoneInsertNotificationEnabled());
- templateContext.set("show-notification-new-sones", currentSone.getOptions().isShowNewSoneNotifications());
- templateContext.set("show-notification-new-posts", currentSone.getOptions().isShowNewPostNotifications());
- templateContext.set("show-notification-new-replies", currentSone.getOptions().isShowNewReplyNotifications());
- templateContext.set("show-custom-avatars", currentSone.getOptions().getShowCustomAvatars().name());
+ if (currentSone.isPresent()) {
+ templateContext.set("auto-follow", currentSone.get().getOptions().isAutoFollow());
+ templateContext.set("enable-sone-insert-notifications", currentSone.get().getOptions().isSoneInsertNotificationEnabled());
+ templateContext.set("show-notification-new-sones", currentSone.get().getOptions().isShowNewSoneNotifications());
+ templateContext.set("show-notification-new-posts", currentSone.get().getOptions().isShowNewPostNotifications());
+ templateContext.set("show-notification-new-replies", currentSone.get().getOptions().isShowNewReplyNotifications());
+ templateContext.set("show-custom-avatars", currentSone.get().getOptions().getShowCustomAvatars().name());