refactor broadcaster.
MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -161,16 +161,28 @@ namespace WalletWasabi.Fluent.ViewModels
BroadcastTransactionViewModel.RegisterAsyncLazy(
async () =>
+ {
+ var result = await DialogScreen.NavigateDialog(new LoadTransactionViewModel(_global.Network));
+
+ if (result is { })
{
while (_global.TransactionBroadcaster is null)
{
await Task.Delay(100);
}
+ DialogScreen.Back();
+
return new BroadcastTransactionViewModel(
_global.BitcoinStore,
_global.Network,
- _global.TransactionBroadcaster);
+ _global.TransactionBroadcaster,
+ result);
+ }
+
+ DialogScreen.Back();
+
+ return null;
});
LegalDocumentsViewModel.RegisterAsyncLazy(

MODIFY
WalletWasabi.Fluent/ViewModels/Navigation/TargettedNavigationStack.cs
WalletWasabi.Fluent/ViewModels/Navigation/TargettedNavigationStack.cs
+using System.Threading.Tasks;
+using WalletWasabi.Fluent.ViewModels.Dialogs;
+
namespace WalletWasabi.Fluent.ViewModels.Navigation
{
+ public static class NavigationExtensions
+ {
+ public static async Task<T> NavigateDialog<T>(
+ this TargettedNavigationStack stack,
+ DialogViewModelBase<T> dialog)
+ {
+ stack.To(dialog);
+
+ var result = await dialog.GetDialogResultAsync();
+
+ stack.Back();
+
+ return result;
+ }
+ }
+
public class TargettedNavigationStack : NavigationStack<RoutableViewModel>
{
private readonly NavigationTarget _target;

MODIFY
WalletWasabi.Fluent/ViewModels/Search/SearchItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Search/SearchItemViewModel.cs
@@ -9,17 +9,21 @@ namespace WalletWasabi.Fluent.ViewModels.Search
private readonly NavigationMetaData _metaData;
public SearchItemViewModel(
+ SearchPageViewModel owner,
NavigationMetaData metaData,
SearchCategory category)
{
+ SearchPageViewModel owner1 = owner;
_metaData = metaData;
Category = category;
OpenCommand = ReactiveCommand.CreateFromTask(
async () =>
{
+ owner1.IsBusy = true;
var view = await NavigationManager.MaterialiseViewModel(metaData);
Navigate(view.DefaultTarget).To(view);
+ owner1.IsBusy = false;
});
}

MODIFY
WalletWasabi.Fluent/ViewModels/Search/SearchPageViewModel.cs
WalletWasabi.Fluent/ViewModels/Search/SearchPageViewModel.cs
@@ -87,7 +87,7 @@ namespace WalletWasabi.Fluent.ViewModels.Search
{
if (_categories.TryGetValue(metaData.Category, out var searchCategory))
{
- var result = new SearchItemViewModel(metaData, searchCategory);
+ var result = new SearchItemViewModel(this, metaData, searchCategory);
_categorySources[searchCategory].Add(result);

refactor broadcaster.