Skip to content

Commit c660862

Browse files
committed
Add important notice
1 parent 48f3b34 commit c660862

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

Components/Pages/Market.razor

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
@page "/Market"
22

3+
<Modal Title="Notice" @bind-IsOpen="ShowNotice" OkButtonText="I understand" OnOkPressed="AcknowledgeNotice" ModalButtonOptions="ModalButtonOptions.OK">
4+
It is important that you do not force stop the app whilst confirming payment receipt or sent. In rare cases you may be required to use a desktop computer to recover the trade.
5+
<br />
6+
<br />
7+
Sometimes updating trades can take a while due to tor so it's best to wait or let it time out and retry.
8+
</Modal>
9+
310
<div class="market-main">
411
<div class="year-price-container">
512
<div class="dropdowns">

Components/Pages/Market.razor.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public int Year
6767
public int CurrentPage { get; set; }
6868
public int PageCount { get; set; }
6969

70+
public bool ShowNotice { get; set; }
71+
7072
[Inject]
7173
public ILocalStorageService LocalStorage { get; set; } = default!;
7274
[Inject]
@@ -124,6 +126,8 @@ protected override async Task OnInitializedAsync()
124126

125127
PreferredCurrency = await LocalStorage.GetItemAsStringAsync("preferredCurrency") ?? CurrencyCultureInfo.FallbackCurrency;
126128

129+
ShowNotice = !Helpers.Preferences.Get<bool>(Helpers.Preferences.InitialNoticeAcknowledged);
130+
127131
try
128132
{
129133
CurrentMarketPrice = BalanceSingleton.MarketPriceInfoDictionary[PreferredCurrency].ToString("0.00");
@@ -157,6 +161,11 @@ protected override async Task OnInitializedAsync()
157161
await base.OnInitializedAsync();
158162
}
159163

164+
private void AcknowledgeNotice()
165+
{
166+
Helpers.Preferences.Set(Helpers.Preferences.InitialNoticeAcknowledged, true);
167+
}
168+
160169
private async void HandleBalanceFetch(bool isFetching)
161170
{
162171
await InvokeAsync(() => {

Helpers/Preferences.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static class Preferences
1515
public const string IsToggled = "is-toggled";
1616
public const string OfferPaymentType = "offer-payment-type";
1717
public const string CustomXmrNode = "custom-xmr-node";
18+
public const string InitialNoticeAcknowledged = "initial-notice-acknowledged";
1819

1920
#if ANDROID
2021
public static void Set<T>(string key, T? data)

0 commit comments

Comments
 (0)