feat: Introduce ITranscriptionOrchestrator and related interfaces, refactoring DaemonService and other components to use dependency injection.
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user