From 5e2b2c2467eb01894907082c24e03724070a2158 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 7 Apr 2020 22:41:15 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=94=A5=20Remove=20unused=20=E2=80=9Ccreate?= =?utf8?q?=E2=80=9D=20flag?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt | 2 +- src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt | 2 +- src/main/kotlin/net/pterodactylus/sone/web/ajax/JsonPage.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt index 66c8ed2..c60fe56 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.kt @@ -21,7 +21,7 @@ class GetNotificationsAjaxPage @Inject constructor(webInterface: WebInterface) : override val requiresLogin = false override fun createJsonObject(request: FreenetRequest) = - getCurrentSone(request.toadletContext, false).let { currentSone -> + getCurrentSone(request.toadletContext).let { currentSone -> webInterface.getNotifications(currentSone) .sortedBy(Notification::getCreatedTime) .let { notifications -> diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt index 75f3c3c..5d17262 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.kt @@ -35,7 +35,7 @@ class GetStatusAjaxPage(webInterface: WebInterface, private val elementLoader: E } override fun createJsonObject(request: FreenetRequest) = - getCurrentSone(request.toadletContext, false).let { currentSone -> + getCurrentSone(request.toadletContext).let { currentSone -> createSuccessJsonObject().apply { this["loggedIn"] = currentSone != null this["options"] = currentSone?.options?.toJsonOptions() ?: jsonObject {} diff --git a/src/main/kotlin/net/pterodactylus/sone/web/ajax/JsonPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/ajax/JsonPage.kt index 574a0a8..356aca6 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/ajax/JsonPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/ajax/JsonPage.kt @@ -31,7 +31,7 @@ abstract class JsonPage(protected val webInterface: WebInterface) : Page