Merge pull request #3116 from sbwalker/dev

improve code documentation
This commit is contained in:
Shaun Walker 2023-08-07 10:39:40 -04:00 committed by GitHub
commit 0710736661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,6 +165,7 @@
user = PageState.User;
}
// get site
if (PageState == null || refresh || PageState.Alias.SiteId != SiteState.Alias.SiteId)
{
site = await SiteService.GetSiteAsync(SiteState.Alias.SiteId);
@ -181,11 +182,11 @@
if (sync.SyncEvents.Any())
{
// reload client application if server was restarted or site runtime/rendermode was modified
if (PageState != null && sync.SyncEvents.Exists(item => item.Action == SyncEventActions.Reload && site != null && ((item.EntityName == EntityNames.Host && site.Runtime != "Server") || (item.EntityName == EntityNames.Site && item.EntityId == site.SiteId))))
if (PageState != null && site != null && sync.SyncEvents.Exists(item => item.Action == SyncEventActions.Reload && ((item.EntityName == EntityNames.Host && site.Runtime != "Server") || (item.EntityName == EntityNames.Site && item.EntityId == site.SiteId))))
{
NavigationManager.NavigateTo(_absoluteUri, true);
}
// when current user auth information has changed the client application needs to be reloaded
// reload client application if current user auth information has changed
if (PageState != null && user != null && sync.SyncEvents.Exists(item => item.Action == SyncEventActions.Reload && item.EntityName == EntityNames.User && item.EntityId == user.UserId))
{
NavigationManager.NavigateTo(_absoluteUri, true);