unset pattern on logout (#1873)

## Description:

During logout, the pattern was still set, so you would fail to join any
game. This PR clears & unsets the chosen pattern on logout.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
This commit is contained in:
evanpelle
2025-08-19 14:35:30 -07:00
committed by GitHub
parent d31434475a
commit 53f4a102c7
+4
View File
@@ -46,6 +46,10 @@ export class TerritoryPatternsModal extends LitElement {
}
async onUserMe(userMeResponse: UserMeResponse | null) {
if (userMeResponse === null) {
this.userSettings.setSelectedPatternName(undefined);
this.selectedPattern = undefined;
}
this.patterns = await patterns(userMeResponse);
const storedPatternName = this.userSettings.getSelectedPatternName();
if (storedPatternName) {