mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
fix: Missing options in preferences causing inconsistent states
This commit is contained in:
parent
a1f6a50a46
commit
f91daed25e
@ -20,7 +20,7 @@ import { WeaponsManager } from "./weapon/weaponsmanager";
|
||||
import { ServerManager } from "./server/servermanager";
|
||||
import { AudioManager } from "./audio/audiomanager";
|
||||
|
||||
import { GAME_MASTER, LoginSubState, NO_SUBSTATE, OlympusState, OlympusSubState, WarningSubstate } from "./constants/constants";
|
||||
import { GAME_MASTER, LoginSubState, MAP_OPTIONS_DEFAULTS, NO_SUBSTATE, OlympusState, OlympusSubState, WarningSubstate } from "./constants/constants";
|
||||
import { AdminPasswordChangedEvent, AppStateChangedEvent, ConfigLoadedEvent, InfoPopupEvent, MapOptionsChangedEvent, SelectedUnitsChangedEvent, ShortcutsChangedEvent } from "./events";
|
||||
import { OlympusConfig } from "./interfaces";
|
||||
import { SessionDataManager } from "./sessiondata";
|
||||
@ -305,7 +305,7 @@ export class OlympusApp {
|
||||
const username = this.getServerManager().getUsername();
|
||||
const profile = this.getProfile();
|
||||
if (username && profile) {
|
||||
this.#map?.setOptions(profile.mapOptions);
|
||||
this.#map?.setOptions( {...profile.mapOptions, ...MAP_OPTIONS_DEFAULTS});
|
||||
this.#shortcutManager?.setShortcutsOptions(profile.shortcuts);
|
||||
this.addInfoMessage("Profile loaded correctly");
|
||||
console.log(`Profile for ${username} loaded correctly`);
|
||||
|
||||
@ -9,11 +9,10 @@ import { BindShortcutRequestEvent, MapOptionsChangedEvent, ShortcutsChangedEvent
|
||||
import { OlAccordion } from "../components/olaccordion";
|
||||
import { Shortcut } from "../../shortcut/shortcut";
|
||||
import { OlSearchBar } from "../components/olsearchbar";
|
||||
import { FaTrash, FaUserGroup, FaXmark } from "react-icons/fa6";
|
||||
import { FaXmark } from "react-icons/fa6";
|
||||
import { OlCoalitionToggle } from "../components/olcoalitiontoggle";
|
||||
import { FaCog, FaKey, FaPlus, FaQuestionCircle } from "react-icons/fa";
|
||||
import { FaCog, FaQuestionCircle } from "react-icons/fa";
|
||||
import { sha256 } from "js-sha256";
|
||||
import { OlDropdown, OlDropdownItem } from "../components/oldropdown";
|
||||
|
||||
const enum Accordion {
|
||||
NONE,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user