1
0

feat: Introduce ITranscriptionOrchestrator and related interfaces, refactoring DaemonService and other components to use dependency injection.

This commit is contained in:
2026-02-28 15:36:03 +01:00
parent ac0ac2397b
commit 0577640da9
18 changed files with 356 additions and 175 deletions

View File

@@ -1,10 +1,19 @@
using System.Diagnostics;
using Toak.Core.Interfaces;
namespace Toak.IO;
public static class ClipboardManager
public class ClipboardManager : IClipboardManager
{
public static void Copy(string text)
private readonly INotifications _notifications;
public ClipboardManager(INotifications notifications)
{
_notifications = notifications;
}
public void Copy(string text)
{
if (string.IsNullOrWhiteSpace(text)) return;
try
@@ -47,7 +56,7 @@ public static class ClipboardManager
catch (Exception ex)
{
Console.WriteLine($"[ClipboardManager] Error copying text: {ex.Message}");
Notifications.Notify("Clipboard Error", "Could not copy text to clipboard.");
_notifications.Notify("Clipboard Error", "Could not copy text to clipboard.");
}
}
}