Merge pull request #362 from hargata/Hargata/persist.columns

null check for column preferences
This commit is contained in:
Hargata Softworks
2024-03-02 19:13:11 -07:00
committed by GitHub

View File

@@ -141,7 +141,8 @@ namespace CarCareTracker.Helper
UserLanguage = _config[nameof(UserConfig.UserLanguage)],
EnableShopSupplies = bool.Parse(_config[nameof(UserConfig.EnableShopSupplies)]),
EnableExtraFieldColumns = bool.Parse(_config[nameof(UserConfig.EnableExtraFieldColumns)]),
VisibleTabs = _config.GetSection("VisibleTabs").Get<List<ImportMode>>(),
VisibleTabs = _config.GetSection(nameof(UserConfig.VisibleTabs)).Get<List<ImportMode>>(),
UserColumnPreferences = _config.GetSection(nameof(UserConfig.UserColumnPreferences)).Get<List<UserColumnPreference>>() ?? new List<UserColumnPreference>(),
DefaultTab = (ImportMode)int.Parse(_config[nameof(UserConfig.DefaultTab)])
};
int userId = 0;