Skip to content

Commit c96c09b

Browse files
committed
#178: in 'new heimat time' consider "shouldBeSynced" status
1 parent 010976d commit c96c09b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,12 @@ public void initForDate(LocalDate currentReportDate, List<Work> currentWorkItems
126126
StringBinding totalSum = Bindings.createStringBinding(() -> localTimeStringConverter.toString(
127127
LocalTime.ofSecondOfDay(
128128
items.stream().filter(item -> item.mapping.heimatTaskId() != -1L) // if its bookable in heimat
129-
.mapToLong(item -> item.userTimeSeconds.getValue()).sum())), items2);
129+
.mapToLong(item -> {
130+
if (item.shouldSyncCheckBox.get())
131+
return item.userTimeSeconds.getValue();
132+
else
133+
return item.heimatTimeSeconds.get();
134+
}).sum())), items2);
130135
sumTimeLabel.textProperty().bind(totalSum);
131136

132137
keepTimeTimeLabel.setText(localTimeStringConverter.toString(

0 commit comments

Comments
 (0)