File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
src/main/java/de/doubleslash/keeptime/view Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -353,19 +353,23 @@ protected List<HeimatController.HeimatErrors> call() {
353353 final List <HeimatController .HeimatErrors > errors = task .getValue ();
354354 if (!errors .isEmpty ()) {
355355 loadingScreenShowSyncing ("Something did not work :(" , loadingFailure );
356- List <String > a = errors .stream ()
357- .map (error -> error .mapping ().mapping ().heimatTaskId () + ": "
358- + error .errorMessage () + ". Wanted to store '" + error .mapping ()
356+ List <String > a = errors .stream ().map (error -> {
357+ final List <Project > projects = error .mapping ().mapping ().projects ();
358+ // TODO would be nice to show heimat task name but we only have ID here
359+ final String projectName = !projects .isEmpty ()
360+ ? projects .get (0 ).getName ()
361+ : Long .toString (error .mapping ().mapping ().heimatTaskId ());
362+ return projectName + ": " + error .errorMessage () + ". Wanted to store '" + error .mapping ()
359363 .userMinutes ()
360- + "' minutes with notes '" + error .mapping ().userNotes () + "'" )
361- .toList ();
364+ + "' minutes with notes '" + error .mapping ().userNotes () + "'" ;
365+ }) .toList ();
362366
363367 showErrorDialog (a );
364368 } else {
365369 loadingScreenShowSyncing ("Successfully synced!" , loadingSuccess );
366370 }
367371
368- PauseTransition delay = new PauseTransition (Duration .seconds (3 ));
372+ PauseTransition delay = new PauseTransition (Duration .seconds (2 ));
369373 delay .setOnFinished (event -> {
370374 showLoadingScreen (false );
371375 thisStage .close ();
You can’t perform that action at this time.
0 commit comments