Skip to content

Commit

Permalink
fix: inconsistencies in printing
Browse files Browse the repository at this point in the history
  • Loading branch information
leeyikai committed Sep 30, 2021
1 parent c98d2b9 commit f414584
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ private static void findTask(String wordToFind) {
if(!taskExists) {
System.out.println("There are no tasks containing such words!");
}

printDivider();
}

/**
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/TaskList.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ protected static void removeTask(int index) {
Task t = Duke.tasks.get(index - 1);
Duke.tasks.remove(index - 1);
System.out.println("Noted. I've removed this task:\n" + t);
Duke.printDivider();
getTasksLeft();
} catch (IndexOutOfBoundsException e) {
System.out.println("This task index does not exist");
Duke.printDivider();
}
}

Expand All @@ -39,7 +41,7 @@ protected static void listAllTask() {
System.out.println((i + 1) + ". " + Duke.tasks.get(i).toString());
}
}
Duke.printDivider();
getTasksLeft();
}

/**
Expand Down

0 comments on commit f414584

Please sign in to comment.