Skip to content

Commit

Permalink
Deadline and list bug fixes
Browse files Browse the repository at this point in the history
Fixed problem with Deadline not working and list not going to the next line
  • Loading branch information
TyrusLye committed Oct 1, 2023
1 parent 0b4d08c commit 7273363
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Binary file removed UI.png
Binary file not shown.
6 changes: 3 additions & 3 deletions src/main/java/Duke.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public String getResponse(String command) {
response.append("Bye. Hope to see you again soon!");

} else if (command.equalsIgnoreCase("list")) {
response.append("Here are the tasks in your list:");
response.append("Here are the tasks in your list:\n");
for (int i = 0; i < tasks.size(); i++) {
response.append((i + 1) + ". " + tasks.get(i));
response.append((i + 1) + ". " + tasks.get(i) + "\n");
}
} else if (command.startsWith("todo")) {
String description = command.substring(5).trim();
Expand Down Expand Up @@ -176,7 +176,7 @@ private static Task createTaskFromLine(String line) {
case "D":
if (parts.length >= 4) {
String by = parts[3];
task = new Deadline(description, LocalDateTime.parse(by, DateTimeFormatter.ofPattern("d/M/yyyy HHmm")));
task = new Deadline(description, LocalDateTime.parse(by, DateTimeFormatter.ISO_LOCAL_DATE_TIME));
}
break;
case "E":
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/tasks.txt

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/view/DialogBox.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<fx:root alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label fx:id="dialog" text="Label" wrapText="true" />
<Label fx:id="dialog" text="Label" wrapText="false" />
<ImageView fx:id="displayPicture" fitHeight="99.0" fitWidth="99.0" pickOnBounds="true" preserveRatio="true" />
</children>
<padding>
Expand Down

0 comments on commit 7273363

Please sign in to comment.