Use Rx event subscription instead of MessageBus to send information

This commit is contained in:
2dust
2025-08-29 15:46:09 +08:00
parent ea1d438e40
commit 058c6e4a85
9 changed files with 62 additions and 39 deletions
+2 -4
View File
@@ -1,5 +1,3 @@
using ReactiveUI;
namespace ServiceLib.Manager;
public class NoticeManager
@@ -13,7 +11,7 @@ public class NoticeManager
{
return;
}
MessageBus.Current.SendMessage(content, EMsgCommand.SendSnackMsg.ToString());
AppEvents.SendSnackMsgRequested.OnNext(content);
}
public void SendMessage(string? content)
@@ -22,7 +20,7 @@ public class NoticeManager
{
return;
}
MessageBus.Current.SendMessage(content, EMsgCommand.SendMsgView.ToString());
AppEvents.SendMsgViewRequested.OnNext(content);
}
public void SendMessageEx(string? content)