Skip to content

Instantly share code, notes, and snippets.

@b-wind
Created September 14, 2020 16:32
Show Gist options
  • Save b-wind/b1e6283809900774b7bfd6dde059197d to your computer and use it in GitHub Desktop.
Save b-wind/b1e6283809900774b7bfd6dde059197d to your computer and use it in GitHub Desktop.
temp
<title>temp</title>

Written with StackEdit.

接触数コード解析

「陽性者との接触を確認する」をクリックした時

ホーム画面から「陽性者との接触を確認する」をクリックしたときは、

  1. UserDataModel::ExposureInformation コレクションの数を調べる
  2. count > 0 の場合は、ContactedNotifyPage ページに飛ぶ
  3. count = 0 の場合は、 NotContactPage ページに飛ぶ
HomePageViewHomePageViewModelExposureNotificationServiceUserDataModelNavigationServiceOnClickExposuresGetExposureCount()ExposureInformation.Count()UserDataModel::ExposureInformationに保持されるcountcountNavigateAsync(ContactedNotifyPage) if count > 0NavigateAsync(NotContactPage) if count = 0HomePageViewHomePageViewModelExposureNotificationServiceUserDataModelNavigationService

UserDataModel::ExposureInformation コレクション

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment