Merge pull request #4458 from sbwalker/dev

use PageState.Site.Settings rather than reloading settings from database
This commit is contained in:
Shaun Walker 2024-07-23 07:45:32 -04:00 committed by GitHub
commit 6ea3399829
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,9 +33,9 @@
[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object> AdditionalAttributes { get; set; } = new Dictionary<string, object>();
protected override async Task OnInitializedAsync()
protected override void OnInitialized()
{
_textEditorType = await GetTextEditorType();
_textEditorType = GetTextEditorType();
}
protected override void OnParametersSet()
@ -109,7 +109,7 @@
}
}
private async Task<string> GetTextEditorType()
private string GetTextEditorType()
{
const string EditorSettingName = "TextEditor";
@ -122,7 +122,6 @@
}
}
var settings = await SettingService.GetSiteSettingsAsync(PageState.Site.SiteId);
return SettingService.GetSetting(settings, EditorSettingName, Constants.DefaultTextEditor);
return SettingService.GetSetting(PageState.Site.Settings, EditorSettingName, Constants.DefaultTextEditor);
}
}