Load the notices from asset loader.
RENAME
WalletWasabi.Gui/Assets/TermsAndCondition.txt
WalletWasabi.Gui/Assets/TermsAndConditions.txt
MODIFY
WalletWasabi.Gui/Tabs/LegalIssuesViewModel.cs
WalletWasabi.Gui/Tabs/LegalIssuesViewModel.cs
using System;
-using System.Collections.Generic;
-using System.Text;
+using System.IO;
+using Avalonia;
+using Avalonia.Platform;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Gui.Tabs
{
internal class LegalIssuesViewModel : WasabiDocumentTabViewModel
{
+ private static string legalIssuesText;
+
public LegalIssuesViewModel(Global global) : base(global, "Legal Issues")
{
- LegalIssues = @"";
+ if (legalIssuesText == null)
+ {
+ var target = new Uri("resm:WalletWasabi.Gui.Assets.LegalIssues.txt");
+ var assetLocator = AvaloniaLocator.Current.GetService<IAssetLoader>();
- LegalIssues += new string('\n', 5);
+ using (var stream = assetLocator.Open(target))
+ using (var reader = new StreamReader(stream))
+ {
+ legalIssuesText = reader.ReadToEnd();
+ }
+ }
}
- public string LegalIssues { get; }
+ public string LegalIssues => legalIssuesText;
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Gui/Tabs/PrivacyPolicyViewModel.cs
WalletWasabi.Gui/Tabs/PrivacyPolicyViewModel.cs
-using Avalonia.Diagnostics.ViewModels;
using System;
-using System.Collections.Generic;
-using System.Text;
+using System.IO;
+using Avalonia;
+using Avalonia.Platform;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Gui.Tabs
{
internal class PrivacyPolicyViewModel : WasabiDocumentTabViewModel
{
+ private static string privacyPolicyText;
+
public PrivacyPolicyViewModel(Global global) : base(global, "Privacy Policy")
{
- PrivacyPolicy = @"";
+ if (privacyPolicyText == null)
+ {
+ var target = new Uri("resm:WalletWasabi.Gui.Assets.PrivacyPolicy.txt");
+ var assetLocator = AvaloniaLocator.Current.GetService<IAssetLoader>();
- PrivacyPolicy += new string('\n', 5);
+ using (var stream = assetLocator.Open(target))
+ using (var reader = new StreamReader(stream))
+ {
+ privacyPolicyText = reader.ReadToEnd();
+ }
+ }
}
- public string PrivacyPolicy { get; }
+ public string PrivacyPolicy => privacyPolicyText;
}
}
\ No newline at end of file

Load the notices from asset loader.