mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-13 22:43:51 +01:00
Fixed #4744
This commit is contained in:
parent
3c1961c846
commit
f8ec8e5ded
1 changed files with 2 additions and 1 deletions
|
@ -30,10 +30,11 @@ public class GlobalTrainDisplayData {
|
|||
}
|
||||
|
||||
public static List<TrainDeparturePrediction> prepare(String filter, int maxLines) {
|
||||
String regex = filter.isBlank() ? filter : "\\Q" + filter.replace("*", "\\E.*\\Q") + "\\E";
|
||||
return statusByDestination.entrySet()
|
||||
.stream()
|
||||
.filter(e -> e.getKey()
|
||||
.matches(filter.replace("*", ".*")))
|
||||
.matches(regex))
|
||||
.flatMap(e -> e.getValue()
|
||||
.stream())
|
||||
.sorted()
|
||||
|
|
Loading…
Reference in a new issue