-
diff --git a/src/client/TerritoryPatternsModal.ts b/src/client/TerritoryPatternsModal.ts
index c4349f113..83cfe207f 100644
--- a/src/client/TerritoryPatternsModal.ts
+++ b/src/client/TerritoryPatternsModal.ts
@@ -25,7 +25,6 @@ export class TerritoryPatternsModal extends BaseModal {
private cosmetics: Cosmetics | null = null;
private userSettings: UserSettings = new UserSettings();
- private isActive = false;
private userMeResponse: UserMeResponse | false = false;
private _onPatternSelected = async () => {
@@ -137,21 +136,25 @@ export class TerritoryPatternsModal extends BaseModal {
}
render() {
- if (!this.isActive && !this.inline) return html``;
-
const content = html`
- ${modalHeader({
- title: translateText("territory_patterns.title"),
- onBack: () => this.close(),
- ariaLabel: translateText("common.back"),
- rightContent: !hasLinkedAccount(this.userMeResponse)
- ? html`
- ${this.renderNotLoggedInWarning()}
-
`
- : undefined,
- })}
-
@@ -174,15 +177,8 @@ export class TerritoryPatternsModal extends BaseModal {
`;
}
- public async open() {
- this.isActive = true;
+ protected async onOpen(): Promise
{
await this.refresh();
- super.open();
- }
-
- public close() {
- this.isActive = false;
- super.close();
}
private selectPattern(pattern: PlayerPattern | null) {