Refactor BumperPlaceholders and BumperFacts for improved logic and readability
Updated the BumperPlaceholders class to streamline token extraction from texts, enhancing performance and clarity. Modified BumperFacts to initialize slot titles with an empty array instead of a dictionary for better consistency. Renamed methods in BumperResolver for clarity, and refactored GridScheduleGenerator to simplify return logic. Additionally, improved the BumperLinesEditor component by implementing a keyed list for better state management and user experience.
This commit is contained in:
@@ -447,13 +447,13 @@ public sealed class GridScheduleGenerator(
|
||||
);
|
||||
}
|
||||
|
||||
return elements.Count == 0
|
||||
? null
|
||||
: new PlanningJunction(
|
||||
id,
|
||||
elements,
|
||||
template.MaxTotalSeconds is { } seconds ? TimeSpan.FromSeconds(seconds) : null
|
||||
);
|
||||
if (elements.Count == 0)
|
||||
return null;
|
||||
|
||||
var cap = template.MaxTotalSeconds is { } seconds
|
||||
? TimeSpan.FromSeconds(seconds)
|
||||
: (TimeSpan?)null;
|
||||
return new PlanningJunction(id, elements, cap);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user