Browse Source

Add MockDiscordRichPresenceService for design time

pull/57/head
Ionite 1 year ago
parent
commit
d51a9facbe
No known key found for this signature in database
  1. 3
      StabilityMatrix.Avalonia/DesignData/DesignData.cs
  2. 18
      StabilityMatrix.Avalonia/DesignData/MockDiscordRichPresenceService.cs

3
StabilityMatrix.Avalonia/DesignData/DesignData.cs

@ -81,7 +81,8 @@ public static class DesignData
.AddSingleton<INotificationService, MockNotificationService>()
.AddSingleton<ISharedFolders, MockSharedFolders>()
.AddSingleton<IDownloadService, MockDownloadService>()
.AddSingleton<IHttpClientFactory, MockHttpClientFactory>();
.AddSingleton<IHttpClientFactory, MockHttpClientFactory>()
.AddSingleton<IDiscordRichPresenceService, MockDiscordRichPresenceService>();
// Placeholder services that nobody should need during design time
services

18
StabilityMatrix.Avalonia/DesignData/MockDiscordRichPresenceService.cs

@ -0,0 +1,18 @@
using System;
using StabilityMatrix.Avalonia.Services;
namespace StabilityMatrix.Avalonia.DesignData;
public class MockDiscordRichPresenceService : IDiscordRichPresenceService
{
/// <inheritdoc />
public void Dispose()
{
GC.SuppressFinalize(this);
}
/// <inheritdoc />
public void UpdateState()
{
}
}
Loading…
Cancel
Save