From 81b5f58574d5ea9116f4ef0bb0c0e095f83e21a0 Mon Sep 17 00:00:00 2001 From: nea Date: Fri, 20 Jan 2023 04:37:33 +0100 Subject: Restructure commands --- .../kotlin/moe/nea/notenoughupdates/commands/rome.kt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/main/kotlin/moe/nea/notenoughupdates/commands/rome.kt') diff --git a/src/main/kotlin/moe/nea/notenoughupdates/commands/rome.kt b/src/main/kotlin/moe/nea/notenoughupdates/commands/rome.kt index 99af49a..a60073a 100644 --- a/src/main/kotlin/moe/nea/notenoughupdates/commands/rome.kt +++ b/src/main/kotlin/moe/nea/notenoughupdates/commands/rome.kt @@ -12,19 +12,19 @@ import moe.nea.notenoughupdates.util.ScreenUtil.setScreenLater fun neuCommand() = literal("neu") { - thenLiteral("reload") { - thenLiteral("fetch") { + thenLiteral("repo") { + thenLiteral("reload") { + thenLiteral("fetch") { + thenExecute { + source.sendFeedback(Text.translatable("notenoughupdates.repo.reload.network")) // TODO better reporting + RepoManager.launchAsyncUpdate() + } + } thenExecute { - source.sendFeedback(Text.translatable("notenoughupdates.repo.reload.network")) // TODO better reporting - RepoManager.launchAsyncUpdate() + source.sendFeedback(Text.translatable("notenoughupdates.repo.reload.disk")) + RepoManager.reload() } } - thenExecute { - source.sendFeedback(Text.translatable("notenoughupdates.repo.reload.disk")) - RepoManager.reload() - } - } - thenLiteral("repo") { thenExecute { setScreenLater(CottonClientScreen(repoGui())) } -- cgit