From 4e1b144329f7379a04f30f79a63dd1c28ba5e37b Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 21 Mar 2020 22:19:09 +0100 Subject: [PATCH] Remove equal sign from edit command --- .../de/epiceric/shopchest/command/EditSubCommand.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/de/epiceric/shopchest/command/EditSubCommand.java b/core/src/main/java/de/epiceric/shopchest/command/EditSubCommand.java index 1b0d657..da5ce66 100644 --- a/core/src/main/java/de/epiceric/shopchest/command/EditSubCommand.java +++ b/core/src/main/java/de/epiceric/shopchest/command/EditSubCommand.java @@ -132,10 +132,6 @@ public class EditSubCommand extends SubCommand { List ret = new ArrayList<>(); - if (!isItemSet) { - ITEM_ARGS.stream().filter(arg -> arg.startsWith(lastArg)).findFirst().ifPresent(ret::add); - } - if (!isAmountSet) { AMOUNT_ARGS.stream().filter(arg -> arg.startsWith(lastArg)).findFirst().ifPresent(ret::add); } @@ -151,6 +147,10 @@ public class EditSubCommand extends SubCommand { // Add equals signs ret.replaceAll(arg -> arg + "="); + if (!isItemSet) { + ITEM_ARGS.stream().filter(arg -> arg.startsWith(lastArg)).findFirst().ifPresent(ret::add); + } + return ret; } } \ No newline at end of file