mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-22 12:06:45 +00:00
Removing the unnecessary fresh unit view retrieval
This commit is contained in:
@@ -821,9 +821,7 @@ export class EventsDisplay extends LitElement implements Layer {
|
||||
): string | DirectiveResult<typeof UnsafeHTMLDirective> {
|
||||
// Add "(retreating)" for boat attacks when the boat is retreating
|
||||
if (event.type === MessageType.NAVAL_INVASION_INBOUND && event.unitView) {
|
||||
// Get fresh unit view to ensure we have current retreating status
|
||||
const currentUnitView = this.game.unit(event.unitView.id());
|
||||
if (currentUnitView && currentUnitView.retreating()) {
|
||||
if (event.unitView.retreating()) {
|
||||
const baseDescription = event.description;
|
||||
const retreatingText = ` (${translateText("events_display.retreating")})`;
|
||||
if (event.unsafeDescription) {
|
||||
|
||||
Reference in New Issue
Block a user