From: David ‘Bombe’ Roden Date: Wed, 1 Jul 2020 20:10:48 +0000 (+0200) Subject: 🔥 Remove methods from web interface X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7345020f0a86eced472fddd5b037c94ec5c966a3;p=Sone.git 🔥 Remove methods from web interface --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 723a166..8585650 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -17,19 +17,14 @@ 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 getNewPosts(@Nullable Sone currentSone) { - return newElements.getNewPosts(); - } - - @Nonnull - public Collection getNewReplies(@Nullable Sone currentSone) { - return newElements.getNewReplies(); - } - // // ACTIONS // diff --git a/src/test/kotlin/net/pterodactylus/sone/web/ajax/TestObjects.kt b/src/test/kotlin/net/pterodactylus/sone/web/ajax/TestObjects.kt index ffd6f15..e125c13 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/ajax/TestObjects.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/ajax/TestObjects.kt @@ -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)