Written with StackEdit.
ホーム画面から「陽性者との接触を確認する」をクリックしたときは、
- UserDataModel::ExposureInformation コレクションの数を調べる
- count > 0 の場合は、ContactedNotifyPage ページに飛ぶ
- count = 0 の場合は、 NotContactPage ページに飛ぶ
HomePageViewHomePageViewModelExposureNotificationServiceUserDataModelNavigationServiceOnClickExposuresGetExposureCount()ExposureInformation.Count()UserDataModel::ExposureInformationに保持されるcountcountNavigateAsync(ContactedNotifyPage) if count > 0NavigateAsync(NotContactPage) if count = 0HomePageViewHomePageViewModelExposureNotificationServiceUserDataModelNavigationService
ExposureInformation コレクションへの追加は、定期的なスケジュール呼び出しで実現される
PlatformScheduleFetchExposureNotification(share)ExposureNotificationHandlerExposureNotification(ios)ENManagerUserDataModelUpdateKeysFromServerFetchExposureKeyBatchFilesFromServerAsync(submitBatches)DownloadBatchAsyncdownloadedFilesdownloadedFiles.Count > 0submitBatches: callbackPlatformDetectExposuresAsync(downloadedFiles)DetectExposuresAsyncsummaryreturn summary, infosummary?.MatchedKeyCount > 0ExposureDetectedAsync(summay, info)ExposureSummary = summaryinfo(): callbackif summary?.MatchedKeyCount > 0 thenGetExposureInfoAsync(detectionSummary...)exposuresinfo.add(new ExposureInfo())loop[ exposures ]return infoexposureInfo <- info()ExposureInformation.add( exposure )loop[ add ]Savereturn ExposureDetectedAsyncreturn submitBatchesdelete filesreturn FetchExposureKeyBatchFilesFromServerAsyncprocessedAnyFilesPlatformScheduleFetchExposureNotification(share)ExposureNotificationHandlerExposureNotification(ios)ENManagerUserDataModel