Skip to content

Commit

Permalink
Implement BrandingProvider changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Aug 17, 2023
1 parent a41ac65 commit dff5830
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
18 changes: 5 additions & 13 deletions Desktop.Shared/Services/BrandingProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@
using Immense.RemoteControl.Shared;
using Immense.RemoteControl.Shared.Models;
using Microsoft.Extensions.Logging;
using Remotely.Shared;
using Remotely.Shared.Entities;
using Remotely.Shared.Enums;
using Remotely.Shared.Services;
using Remotely.Shared.Utilities;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Json;
using System.Text;
using System.Threading.Tasks;

namespace Desktop.Shared.Services;

Expand All @@ -41,11 +31,14 @@ public BrandingProvider(
_logger = logger;
}

public async Task<BrandingInfoBase> GetBrandingInfo()
public BrandingInfoBase CurrentBranding => _brandingInfo ??
throw new InvalidOperationException("Branding info has not been set or initialized.");

public async Task Initialize()
{
if (_brandingInfo is not null)
{
return _brandingInfo;
return;
}

var result = await TryGetBrandingInfo();
Expand All @@ -71,7 +64,6 @@ public async Task<BrandingInfoBase> GetBrandingInfo()

_brandingInfo.Icon = ms.ToArray();
}
return _brandingInfo;
}

public void SetBrandingInfo(BrandingInfoBase brandingInfo)
Expand Down
1 change: 0 additions & 1 deletion Desktop.Win/Desktop.Win.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyName>Remotely_Desktop</AssemblyName>
<RootNamespace>Remotely.Desktop.Win</RootNamespace>
<ApplicationIcon>Assets\favicon.ico</ApplicationIcon>
Expand Down

0 comments on commit dff5830

Please sign in to comment.