Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Fix ReAgree*Page are not launched from DebugPage. #912

Merged
merged 2 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
using Acr.UserDialogs;
using Chino;
using Covid19Radar.Common;
using Covid19Radar.Model;
using Covid19Radar.Repository;
using Covid19Radar.Services;
using Covid19Radar.Views;
using Prism.Navigation;
using Xamarin.Essentials;
using Xamarin.Forms;
Expand Down Expand Up @@ -293,6 +295,24 @@ private string ConvertSha256(string text)
await UpdateInfo("RemoveAllUpdateDate");
});

public Command OnClickReAgreeTermsOfServicePage => new Command(async () =>
{
var termsUpdateInfoModel = new TermsUpdateInfoModel
{
TermsOfService = new TermsUpdateInfoModel.Detail { Text = "DEBUG 利用規約の変更", UpdateDateTimeJst = new DateTime(2022, 03, 14) },
PrivacyPolicy = new TermsUpdateInfoModel.Detail { Text = "DEBUG プライバシーポリシーの変更", UpdateDateTimeJst = new DateTime(2022, 03, 14) }
};
var navigationParams = ReAgreeTermsOfServicePage.BuildNavigationParams(termsUpdateInfoModel, Destination.HomePage);
_ = await NavigationService.NavigateAsync("/" + nameof(ReAgreeTermsOfServicePage), navigationParams);
});

public Command OnClickReAgreePrivacyPolicyPage => new Command(async () =>
{
var privacyPolicyUpdated = new TermsUpdateInfoModel.Detail { Text = "DEBUG プライバシーポリシーの変更", UpdateDateTimeJst = new DateTime(2022, 03, 14) };
var navigationParams = ReAgreePrivacyPolicyPage.BuildNavigationParams(privacyPolicyUpdated, Destination.HomePage);
_ = await NavigationService.NavigateAsync("/" + nameof(ReAgreePrivacyPolicyPage), navigationParams);
});

public Command OnClickQuit => new Command(() =>
{
Application.Current.Quit();
Expand Down
4 changes: 2 additions & 2 deletions Covid19Radar/Covid19Radar/Views/Settings/DebugPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@
Style="{StaticResource DefaultButton}"
Text="ExposuresPage" />
<Button
Command="{prism:NavigateTo 'ReAgreePrivacyPolicyPage'}"
Command="{Binding OnClickReAgreePrivacyPolicyPage}"
Style="{StaticResource DefaultButton}"
Text="ReAgreePrivacyPolicyPage" />
<Button
Command="{prism:NavigateTo 'ReAgreeTermsOfServicePage'}"
Command="{Binding OnClickReAgreeTermsOfServicePage}"
Style="{StaticResource DefaultButton}"
Text="ReAgreeTermsOfServicePage" />
<Button
Expand Down