Skip to content

Commit 92d3fe3

Browse files
ddamkeddamke
authored andcommitted
implement better solution fot underline workItems
1 parent f7956c6 commit 92d3fe3

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/main/java/de/doubleslash/keeptime/view/ReportController.java

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ public class ReportController {
104104

105105
private final TreeItem<TableRow> rootItem = new TreeItem<>();
106106

107-
private static List<String> workTimeList = new ArrayList<>();
108-
109107
@Autowired
110108
public ReportController(final Model model, final Controller controller) {
111109
this.model = model;
@@ -178,14 +176,10 @@ protected void updateItem(TableRow workItem, boolean empty) {
178176
this.setGraphic(null);
179177
this.setText(null);
180178
} else {
181-
this.setGraphic(new Label(workItem.getTimeSum()));
182-
183-
if(workItem.isUnderlined()){
184-
Label workLabel = new Label(workItem.getTimeSum());
185-
workLabel.setUnderline(true);
186-
this.setGraphic(workLabel);
187-
188-
}
179+
Label workLabel = new Label(workItem.getTimeSum());
180+
workLabel.setUnderline(workItem.isUnderlined());
181+
this.setGraphic(workLabel);
182+
this.setText(null);
189183
}
190184
}
191185
};
@@ -236,10 +230,6 @@ private void updateReport(final LocalDate dateToShow) {
236230

237231
final long projectWorkSeconds = controller.calcSeconds(onlyCurrentProjectWork);
238232

239-
if(project.isWork()){
240-
workTimeList.add(DateFormatter.secondsToHHMMSS(projectWorkSeconds));
241-
}
242-
243233
currentSeconds += projectWorkSeconds;
244234
if (project.isWork()) {
245235
currentWorkSeconds += projectWorkSeconds;

0 commit comments

Comments
 (0)