mirror of
https://github.com/dedicatedcode/reitti.git
synced 2026-01-09 17:37:57 -05:00
391 nosuchelementexception while creatingregenerating memories (#393)
This commit is contained in:
@@ -189,10 +189,11 @@ public class MemoryBlockGenerationService {
|
||||
.filter(trip -> trip.getEndTime() != null && (trip.getEndTime().equals(cluster.getStartTime())))
|
||||
.sorted(Comparator.comparing(Trip::getEndTime))
|
||||
.toList();
|
||||
|
||||
if (Duration.between(tripsBetweenVisits.getFirst().getStartTime(), tripsBetweenVisits.getLast().getEndTime()).toMinutes() > 30) {
|
||||
MemoryClusterBlock clusterBlock = convertToTripCluster(tripsBetweenVisits, "Journey to " + cluster.getHighestScoredVisit().visit().getPlace().getCity());
|
||||
blockParts.add(clusterBlock);
|
||||
if (!tripsBetweenVisits.isEmpty() && cluster.getHighestScoredVisit() != null) {
|
||||
if (Duration.between(tripsBetweenVisits.getFirst().getStartTime(), tripsBetweenVisits.getLast().getEndTime()).toMinutes() > 30) {
|
||||
MemoryClusterBlock clusterBlock = convertToTripCluster(tripsBetweenVisits, i18n.translate("memory.generator.journey_to.headline.text", cluster.getHighestScoredVisit().visit().getPlace().getCity()));
|
||||
blockParts.add(clusterBlock);
|
||||
}
|
||||
}
|
||||
previousVisit = cluster.getVisits().stream().map(ScoredVisit::visit).max(Comparator.comparing(ProcessedVisit::getEndTime)).orElse(null);
|
||||
}
|
||||
|
||||
@@ -1100,6 +1100,7 @@ memory.view.block.cluster_visit.duration=Spent {0} hours {1} minutes.
|
||||
|
||||
memory.generator.day.text=Day {0}: {1}
|
||||
memory.generator.headline.text=Our Journey
|
||||
memory.generator.journey_to.headline.text=Journey to {0}
|
||||
|
||||
memory.generator.introductory.text=What an unforgettable adventure we had! Our journey began on {0} as we set out from {1}, and for the \
|
||||
next {2} days, we made {3}, {4} our wonderful home base. \
|
||||
|
||||
Reference in New Issue
Block a user