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

基準値未満の接触画面リファインメント #889

Merged
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
4 changes: 2 additions & 2 deletions Covid19Radar/Covid19Radar/Resources/AppResources.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@
<comment>受信した信号</comment>
</data>
<data name="LowRiskContactPageAnnotationDecription" xml:space="preserve">
<value>スコアは、受信した信号の強さと時間から算出しています。一般的な条件では1m以内・15分以上の接触で100以上になるように設定しています。</value>
<comment>スコアは、受信した信号の強さと時間から算出しています。一般的な条件では1m以内・15分以上の接触で100以上になるように設定しています。</comment>
<value>スコアは、受信した信号の強さと時間から算出しています。一般的な条件では1m以内・15分以上の接触で100以上になるように設定しています。</value>
<comment>スコアは、受信した信号の強さと時間から算出しています。一般的な条件では1m以内・15分以上の接触で100以上になるように設定しています。</comment>
</data>
<data name="LowRiskContactPageAnnotationDecription2" xml:space="preserve">
<value>※日時については、協定世界時(UTC)を設定されているタイムゾーンに変換して、期間として表示しています。</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ private int GetLastOffsetDay(List<DailySummary> dailySummaryList)
{
var dayOfUse = _userDataRepository.GetDaysOfUse();

var latestExposureDateMillisSinceEpoch = dailySummaryList.Max(x => x.DateMillisSinceEpoch);
var latestExposureDate = DateTimeOffset.UnixEpoch.AddMilliseconds(latestExposureDateMillisSinceEpoch).UtcDateTime;
var latestExposureDateOffset = (DateTime.UtcNow.Date - latestExposureDate).Days;
var oldestExposureDateMillisSinceEpoch = dailySummaryList.Min(x => x.DateMillisSinceEpoch);
var oldestExposureDate = DateTimeOffset.UnixEpoch.AddMilliseconds(oldestExposureDateMillisSinceEpoch).UtcDateTime;
var oldestExposureDateOffset = (DateTime.UtcNow.Date - oldestExposureDate).Days;

var daysOffset = Math.Max(
dayOfUse,
latestExposureDateOffset
oldestExposureDateOffset
);

daysOffset = Math.Min(
Expand Down
24 changes: 20 additions & 4 deletions Covid19Radar/Covid19Radar/Views/HomePage/ExposureCheckPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,27 @@
IsVisible="{Binding IsExposureDetected}"
>
<Label
Style="{StaticResource DefaultLabelCaptionStartAlignment}"
Text="{Binding LowRiskContactPageAnnotationDecription}" />
Style="{StaticResource AnnotationLabel}"
TextColor="{StaticResource PrimaryText}">
<Label.FormattedText>
<FormattedString>
<Span Text="{x:Static resources:AppResources.AnnotationSymbol}"/>
<Span Text="{Binding LowRiskContactPageAnnotationDecription}"/>
</FormattedString>
</Label.FormattedText>
</Label>

<Label
Style="{StaticResource DefaultLabelCaptionStartAlignment}"
Text="{x:Static resources:AppResources.LowRiskContactPageAnnotationDecription2}" />
Margin="0, 10, 0, 0"
Style="{StaticResource AnnotationLabel}"
TextColor="{StaticResource PrimaryText}">
<Label.FormattedText>
<FormattedString>
<Span Text="{x:Static resources:AppResources.AnnotationSymbol}"/>
<Span Text="{x:Static resources:AppResources.LowRiskContactPageAnnotationDecription2}"/>
</FormattedString>
</Label.FormattedText>
</Label>
</StackLayout>
</CollectionView.Footer>
</CollectionView>
Expand Down