Remove evil static
MODIFY
WalletWasabi.Gui/Tabs/LegalIssuesViewModel.cs
WalletWasabi.Gui/Tabs/LegalIssuesViewModel.cs
@@ -8,11 +8,9 @@ namespace WalletWasabi.Gui.Tabs
{
internal class LegalIssuesViewModel : WasabiDocumentTabViewModel
{
- private static string LegalIssuesText;
+ public string LegalIssues { get; }
public LegalIssuesViewModel(Global global) : base(global, "Legal Issues")
- {
- if (LegalIssuesText == null)
{
var target = new Uri("resm:WalletWasabi.Gui.Assets.LegalIssues.txt");
var assetLocator = AvaloniaLocator.Current.GetService<IAssetLoader>();
@@ -20,11 +18,8 @@ namespace WalletWasabi.Gui.Tabs
using (var stream = assetLocator.Open(target))
using (var reader = new StreamReader(stream))
{
- LegalIssuesText = reader.ReadToEnd();
- }
+ LegalIssues = reader.ReadToEnd();
}
}
-
- public string LegalIssues => LegalIssuesText;
}
}

MODIFY
WalletWasabi.Gui/Tabs/PrivacyPolicyViewModel.cs
WalletWasabi.Gui/Tabs/PrivacyPolicyViewModel.cs
@@ -8,11 +8,9 @@ namespace WalletWasabi.Gui.Tabs
{
internal class PrivacyPolicyViewModel : WasabiDocumentTabViewModel
{
- private static string PrivacyPolicyText;
+ public string PrivacyPolicy { get; }
public PrivacyPolicyViewModel(Global global) : base(global, "Privacy Policy")
- {
- if (PrivacyPolicyText == null)
{
var target = new Uri("resm:WalletWasabi.Gui.Assets.PrivacyPolicy.txt");
var assetLocator = AvaloniaLocator.Current.GetService<IAssetLoader>();
@@ -20,11 +18,8 @@ namespace WalletWasabi.Gui.Tabs
using (var stream = assetLocator.Open(target))
using (var reader = new StreamReader(stream))
{
- PrivacyPolicyText = reader.ReadToEnd();
- }
+ PrivacyPolicy = reader.ReadToEnd();
}
}
-
- public string PrivacyPolicy => PrivacyPolicyText;
}
}

MODIFY
WalletWasabi.Gui/Tabs/TermsAndConditionsViewModel.cs
WalletWasabi.Gui/Tabs/TermsAndConditionsViewModel.cs
@@ -8,11 +8,9 @@ namespace WalletWasabi.Gui.Tabs
{
internal class TermsAndConditionsViewModel : WasabiDocumentTabViewModel
{
- private static string TermsAndConditionsText;
+ public string TermsAndConditions { get; }
public TermsAndConditionsViewModel(Global global) : base(global, "Terms and Conditions")
- {
- if (TermsAndConditionsText == null)
{
var target = new Uri("resm:WalletWasabi.Gui.Assets.TermsAndConditions.txt");
var assetLocator = AvaloniaLocator.Current.GetService<IAssetLoader>();
@@ -20,11 +18,8 @@ namespace WalletWasabi.Gui.Tabs
using (var stream = assetLocator.Open(target))
using (var reader = new StreamReader(stream))
{
- TermsAndConditionsText = reader.ReadToEnd();
- }
+ TermsAndConditions = reader.ReadToEnd();
}
}
-
- public string TermsAndConditions => TermsAndConditionsText;
}
}

Remove evil static