import java.util.Collections;
import java.util.List;
-import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.data.LocalSone;
import net.pterodactylus.sone.main.SonePlugin;
import net.pterodactylus.sone.notify.ListNotificationFilters;
import net.pterodactylus.sone.web.WebInterface;
*/
@Override
protected JsonReturnObject createJsonObject(FreenetRequest request) {
- Optional<Sone> currentSone = getCurrentSone(request.getToadletContext(), false);
+ Optional<LocalSone> currentSone = getCurrentSone(request.getToadletContext(), false);
Collection<Notification> notifications = webInterface.getNotifications().getNotifications();
List<Notification> filteredNotifications = ListNotificationFilters.filterNotifications(notifications, currentSone.orNull());
Collections.sort(filteredNotifications, Notification.CREATED_TIME_SORTER);
* The current Sone (may be {@code null})
* @return The current options
*/
- private static JsonNode createJsonOptions(Optional<Sone> currentSone) {
+ private static JsonNode createJsonOptions(Optional<LocalSone> currentSone) {
ObjectNode options = new ObjectNode(instance);
if (currentSone.isPresent()) {
options.put("ShowNotification/NewSones", currentSone.get().getOptions().isShowNewSoneNotifications());