From 435fde84eed94c7b8ddfa83c271ebb26748c6a82 Mon Sep 17 00:00:00 2001 From: S-K-Y-Light Date: Thu, 7 Nov 2024 21:36:02 +0800 Subject: [PATCH] Force Consultation & Lesson UI to Update 500 Times --- src/main/java/seedu/address/ui/ConsultationCard.java | 2 +- src/main/java/seedu/address/ui/LessonCard.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/seedu/address/ui/ConsultationCard.java b/src/main/java/seedu/address/ui/ConsultationCard.java index 1ed8e3620d8..b3b472b2f1e 100644 --- a/src/main/java/seedu/address/ui/ConsultationCard.java +++ b/src/main/java/seedu/address/ui/ConsultationCard.java @@ -64,7 +64,7 @@ public ConsultationCard(Consultation consultation, int displayedIndex) { .forEach(this::createLabel); // Ui Doesn't Properly Update Unless this Line of Code is run multiple times - for (int i = 0; i < 5; i++) { + for (int i = 0; i < 500; i++) { Platform.runLater(() -> cardPane.getParent().requestLayout()); } } diff --git a/src/main/java/seedu/address/ui/LessonCard.java b/src/main/java/seedu/address/ui/LessonCard.java index 5d73b7f3860..afe2224356c 100644 --- a/src/main/java/seedu/address/ui/LessonCard.java +++ b/src/main/java/seedu/address/ui/LessonCard.java @@ -64,7 +64,7 @@ public LessonCard(Lesson lesson, int displayedIndex) { .forEach(this::createLabel); // Ui Doesn't Properly Update Unless this Line of Code is run multiple times - for (int i = 0; i < 5; i++) { + for (int i = 0; i < 500; i++) { Platform.runLater(() -> cardPane.getParent().requestLayout()); } }