diff --git a/Qwilight/JSON.cs b/Qwilight/JSON.cs index a94ed40..af7ac23 100644 --- a/Qwilight/JSON.cs +++ b/Qwilight/JSON.cs @@ -403,7 +403,7 @@ public struct TwilightCallBundle { public string targetAvatar; - public bool isWindowOpen; + public bool isSilent; public long targetValue; public long bundleLength; public BundleDataItem[] data; diff --git a/Qwilight/MSG/ViewOKWindow.cs b/Qwilight/MSG/ViewOKWindow.cs new file mode 100644 index 0000000..7075779 --- /dev/null +++ b/Qwilight/MSG/ViewOKWindow.cs @@ -0,0 +1,11 @@ +using CommunityToolkit.Mvvm.Messaging.Messages; + +namespace Qwilight.MSG +{ + public sealed class ViewOKWindow : AsyncRequestMessage + { + public string Text { get; init; } + + public bool IsDefaultOK { get; init; } + } +} \ No newline at end of file diff --git a/Qwilight/System/TwilightSystem.cs b/Qwilight/System/TwilightSystem.cs index 93ae7f2..ba6dfc0 100644 --- a/Qwilight/System/TwilightSystem.cs +++ b/Qwilight/System/TwilightSystem.cs @@ -444,7 +444,7 @@ case Event.Types.EventID.CallBundle: var twilightCallBundle = Utility.GetJSON(eventItemText); var targetAvatar = twilightCallBundle.targetAvatar; - if (twilightCallBundle.isWindowOpen || (bundleViewModel.IsOpened && bundleViewModel.TargetBundleAvatar == targetAvatar)) + if (!twilightCallBundle.isSilent || (bundleViewModel.IsOpened && bundleViewModel.TargetBundleAvatar == targetAvatar)) { var noteFilesBundleItems = new List(); var noteFileBundleItems = new List(); @@ -859,7 +859,7 @@ if (length < savingBundleItem.Data.Length) { Send(Event.Types.EventID.SavedAsBundle, saveAsBundleID, UnsafeByteOperations.UnsafeWrap(savingBundleItem.Data.AsMemory(0, length))); - if (_savingBundleItems.Remove(eventItemText, out _)) + if (_savingBundleItems.Remove(saveAsBundleID, out _)) { savingBundleItem.Variety = NotifySystem.NotifyVariety.Quit; savingBundleItem.Text = LanguageSystem.Instance.SavedAsBundleContents; diff --git a/Qwilight/View/MainWindow/MainWindow.xaml.cs b/Qwilight/View/MainWindow/MainWindow.xaml.cs index 17c04d0..58f48b7 100644 --- a/Qwilight/View/MainWindow/MainWindow.xaml.cs +++ b/Qwilight/View/MainWindow/MainWindow.xaml.cs @@ -159,7 +159,7 @@ var entryWindow = new FolderPicker(); InitializeWithWindow.Initialize(entryWindow, _handle); entryWindow.FileTypeFilter.Add("*"); - message.Reply(entryWindow.PickSingleFolderAsync().AsTask().ContinueWith(entry => entry.Result?.Path)); + message.Reply(entryWindow.PickSingleFolderAsync().AsTask().ContinueWith(entry => entry.Result?.Path)); }); StrongReferenceMessenger.Default.Register(this, (recipient, message) => { @@ -169,7 +169,7 @@ { fileWindow.FileTypeFilter.Add(filter); } - message.Reply(fileWindow.PickSingleFileAsync().AsTask().ContinueWith(file => file.Result?.Path)); + message.Reply(fileWindow.PickSingleFileAsync().AsTask().ContinueWith(file => file.Result?.Path)); }); StrongReferenceMessenger.Default.Register(this, (recipient, message) => PInvoke.PostMessage(_handle, PInvoke.WM_CLOSE, message.ViewAllowWindow ? (WPARAM)1 : (WPARAM)0, (LPARAM)0)); StrongReferenceMessenger.Default.Register(this, (recipient, message) =>