[File Explorer] fix enabling all modules at start (#12599)

This commit is contained in:
Jaime Bernardo 2021-08-04 13:42:19 +01:00 committed by GitHub
parent b84f9c93bf
commit d106db8061
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,9 +16,7 @@ PowerPreviewModule::PowerPreviewModule() :
m_moduleName(GET_RESOURCE_STRING(IDS_MODULE_NAME)),
app_key(powerpreviewConstants::ModuleKey)
{
// Initialize the toggle states for each module
init_settings();
// Initialize the preview modules.
m_fileExplorerModules.emplace_back(std::make_unique<PreviewHandlerSettings>(
true,
L"svg-previewer-toggle-setting",
@ -44,6 +42,9 @@ PowerPreviewModule::PowerPreviewModule() :
std::make_unique<RegistryWrapper>(),
L".svg\\shellex\\{E357FCCD-A995-4576-B01F-234630154E96}"));
// Initialize the toggle states for each module.
init_settings();
// File Explorer might be disabled if user updated from old to new settings.
// Initialize the registry state in the constructor as PowerPreviewModule::enable/disable will not be called on startup
update_registry_to_match_toggles();