🔥 Remove methods from web interface
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 1 Jul 2020 20:10:48 +0000 (22:10 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 1 Jul 2020 20:15:32 +0000 (22:15 +0200)
src/main/java/net/pterodactylus/sone/web/WebInterface.java
src/test/kotlin/net/pterodactylus/sone/web/ajax/TestObjects.kt

index 723a166..8585650 100644 (file)
 
 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;
@@ -231,16 +226,6 @@ public class WebInterface implements SessionProvider {
                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
        //
index ffd6f15..e125c13 100644 (file)
@@ -85,8 +85,6 @@ open class TestObjects {
                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)