diff --git a/BuildsAppReborn.Access/BuildMonitor.cs b/BuildsAppReborn.Access/BuildMonitor.cs index 2f3608b..2559107 100644 --- a/BuildsAppReborn.Access/BuildMonitor.cs +++ b/BuildsAppReborn.Access/BuildMonitor.cs @@ -21,17 +21,17 @@ internal sealed class BuildMonitor : IBuildMonitorAdvanced [ImportingConstructor] public BuildMonitor(LazyContainer buildProviders, LazyContainer notificationProviders, - IEqualityComparer buildDefinitionEqualityComparer) + IEqualityComparer buildDefinitionEqualityComparer, + GeneralSettings generalSettings) { this.buildProviders = buildProviders; this.buildDefinitionEqualityComparer = buildDefinitionEqualityComparer; + this.generalSettings = generalSettings; this.notificationProvider = notificationProviders.GetSupportedNotificationProvider(); -#pragma warning disable 4014 - this.timer.Elapsed += (sender, args) => BeginPollingBuildsAsync(); -#pragma warning restore 4014 + this.timer.Elapsed += (sender, args) => BeginPollingBuildsAsync().GetAwaiter().GetResult(); } - public Boolean IsConfigured => this.providerSettingsGroup.Any() && this.providerSettingsGroup.SelectMany(a => a.Value).SelectMany(a => a.SelectedBuildDefinitions).Any(); + public Boolean IsConfigured => this.providerSettingsGroup.Any() && (this.generalSettings.ViewStyle == BuildViewStyle.GroupByPullRequest || this.providerSettingsGroup.SelectMany(a => a.Value).SelectMany(a => a.SelectedBuildDefinitions).Any()); public async Task BeginPollingBuildsAsync() {