Skip to content

Commit

Permalink
Bugfix loading issues (#27)
Browse files Browse the repository at this point in the history
* Fixed the need to configure selected build definitions when grouping by pull request

* Fixed possible polling dead lock issues
  • Loading branch information
Luka Grabarevic authored Jul 9, 2018
1 parent 6ffc68f commit 53e6050
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions BuildsAppReborn.Access/BuildMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ internal sealed class BuildMonitor : IBuildMonitorAdvanced
[ImportingConstructor]
public BuildMonitor(LazyContainer<IBuildProvider, IBuildProviderMetadata> buildProviders,
LazyContainer<INotificationProvider, IPriorityMetadata> notificationProviders,
IEqualityComparer<IBuildDefinition> buildDefinitionEqualityComparer)
IEqualityComparer<IBuildDefinition> 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()
{
Expand Down

0 comments on commit 53e6050

Please sign in to comment.