package net.pterodactylus.sone.web;
-import static java.util.logging.Logger.getLogger;
-
import java.util.Collection;
import java.util.TimeZone;
-import java.util.logging.Logger;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.core.ElementLoader;
import net.pterodactylus.sone.core.event.*;
-import net.pterodactylus.sone.data.Post;
-import net.pterodactylus.sone.data.PostReply;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.freenet.L10nFilter;
import net.pterodactylus.sone.freenet.Translation;
return formPassword;
}
- @Nonnull
- public Collection<Post> getNewPosts(@Nullable Sone currentSone) {
- return newElements.getNewPosts();
- }
-
- @Nonnull
- public Collection<PostReply> getNewReplies(@Nullable Sone currentSone) {
- return newElements.getNewReplies();
- }
-
//
// ACTIONS
//
whenever(webInterface.formPassword).then { formPassword }
whenever(webInterface.getNotifications(currentSone)).thenAnswer { notifications.values }
whenever(webInterface.getNotification(ArgumentMatchers.anyString())).then { notifications[it[0]].asOptional() }
- whenever(webInterface.getNewPosts(currentSone)).thenAnswer { newPosts.values }
- whenever(webInterface.getNewReplies(currentSone)).thenAnswer { newReplies.values }
whenever(webInterface.translation).thenReturn(translation)
whenever(core.preferences).thenReturn(preferences)