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

Commit

Permalink
Merge pull request #1063 from cocoa-mhlw/feature/event-log-pages
Browse files Browse the repository at this point in the history
チュートリアル、起動時のイベントログ関連画面の追加
  • Loading branch information
cocoa-dev004 authored Jul 5, 2022
2 parents d62f4af + 5e884df commit 53fe646
Show file tree
Hide file tree
Showing 44 changed files with 2,107 additions and 330 deletions.
8 changes: 8 additions & 0 deletions Covid19Radar/Covid19Radar.Android/Covid19Radar.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,14 @@
<SubType></SubType>
<Generator></Generator>
</AndroidResource>
<AndroidResource Include="Resources\drawable-xhdpi\Improvement_img.png">
<SubType></SubType>
<Generator></Generator>
</AndroidResource>
<AndroidResource Include="Resources\drawable-xxhdpi\Improvement_img.png">
<SubType></SubType>
<Generator></Generator>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
Expand Down
3 changes: 1 addition & 2 deletions Covid19Radar/Covid19Radar.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ protected override async void OnCreate(Bundle savedInstanceState)
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.SetTheme(Resource.Style.MainTheme);
base.OnCreate(savedInstanceState);

AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightNo;
base.OnCreate(savedInstanceState);

Xamarin.Essentials.Platform.Init(this, savedInstanceState);
Xamarin.Forms.Forms.Init(this, savedInstanceState);
Expand Down
3 changes: 3 additions & 0 deletions Covid19Radar/Covid19Radar.Android/MainApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using System.Threading.Tasks;
using Prism.Ioc;
using Covid19Radar.Repository;
using AndroidX.AppCompat.App;

namespace Covid19Radar.Droid
{
Expand Down Expand Up @@ -72,6 +73,8 @@ public AbsExposureNotificationClient GetEnClient()

public override void OnCreate()
{
AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightNo;

base.OnCreate();

App.InitializeServiceLocator(RegisterPlatformTypes);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Covid19Radar/Covid19Radar.iOS/Covid19Radar.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@
<BundleResource Include="Resources\Base.lproj\img_number_2%403x.png" />
<BundleResource Include="Resources\Base.lproj\img_number_3%402x.png" />
<BundleResource Include="Resources\Base.lproj\img_number_3%403x.png" />
<BundleResource Include="Resources\Base.lproj\Improvement_img%402x.png" />
<BundleResource Include="Resources\Base.lproj\Improvement_img%403x.png" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion Covid19Radar/Covid19Radar/App.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
Expand Down Expand Up @@ -32,6 +32,7 @@
<Color x:Key="LinkColor">#066AB9</Color>
<Color x:Key="CheckedRadioButtonBackground">#E8F7FF</Color>
<Color x:Key="DisabledRadioButtonBackground">#EEEEEE</Color>
<Color x:Key="CheckBoxColor">#066AB9</Color>

<!-- Icons -->
<x:String x:Key="IconProfile">&#xf2bd;</x:String>
Expand Down Expand Up @@ -323,6 +324,10 @@
<Setter Property="TextColor" Value="{StaticResource PrimaryText}" />
</Style>

<Style x:Key="DefaultCheckBox" TargetType="CheckBox">
<Setter Property="Color" Value="{StaticResource CheckBoxColor}" />
</Style>

</ResourceDictionary>
</Application.Resources>
</prism:PrismApplication>
7 changes: 6 additions & 1 deletion Covid19Radar/Covid19Radar/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ protected override void RegisterTypes(IContainerRegistry containerRegistry)
// Settings
containerRegistry.RegisterForNavigation<SettingsPage>();
containerRegistry.RegisterForNavigation<LicenseAgreementPage>();
containerRegistry.RegisterForNavigation<EventLogSettingPage>();

// tutorial
containerRegistry.RegisterForNavigation<TutorialPage1>();
Expand All @@ -150,6 +151,7 @@ protected override void RegisterTypes(IContainerRegistry containerRegistry)
containerRegistry.RegisterForNavigation<PrivacyPolicyPage>();
containerRegistry.RegisterForNavigation<TutorialPage4>();
containerRegistry.RegisterForNavigation<TutorialPage6>();
containerRegistry.RegisterForNavigation<EventLogCooperationPage>();

// Help
containerRegistry.RegisterForNavigation<HelpMenuPage>();
Expand Down Expand Up @@ -188,17 +190,18 @@ private static void RegisterCommonTypes(IContainer container)
container.Register<ILogUploadService, LogUploadService>(Reuse.Singleton);
container.Register<IEssentialsService, EssentialsService>(Reuse.Singleton);
container.Register<IUserDataService, UserDataService>(Reuse.Singleton);
container.Register<ITermsUpdateService, TermsUpdateService>(Reuse.Singleton);
container.Register<IHttpClientService, HttpClientService>(Reuse.Singleton);
container.Register<IMigrationService, MigrationService>(Reuse.Singleton);
container.Register<IExposureDataExportService, ExposureDataExportService>(Reuse.Singleton);

#if USE_MOCK
container.Register<IHttpDataService, HttpDataServiceMock>(Reuse.Singleton);
container.Register<IStorageService, StorageServiceMock>(Reuse.Singleton);
container.Register<ITermsUpdateService, TermsUpdateServiceMock>(Reuse.Singleton);
#else
container.Register<IHttpDataService, HttpDataService>(Reuse.Singleton);
container.Register<IStorageService, StorageService>(Reuse.Singleton);
container.Register<ITermsUpdateService, TermsUpdateService>(Reuse.Singleton);
#endif

#if DEBUG
Expand All @@ -224,6 +227,8 @@ private static void RegisterCommonTypes(IContainer container)
container.Register<IEventLogRepository, EventLogRepository>(Reuse.Singleton);
container.Register<IEventLogService, EventLogService>(Reuse.Singleton);

container.Register<ISplashNavigationService, SplashNavigationService>(Reuse.Singleton);

// Utilities
container.Register<IDateTimeUtility, DateTimeUtility>(Reuse.Singleton);
container.Register<IDeviceInfoUtility, DeviceInfoUtility>(Reuse.Singleton);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ public enum SendEventLogState
public class EventType
{
public static readonly EventType ExposureNotified = new EventType("ExposureNotification", "ExposureNotified");
public static readonly EventType ExposureData = new EventType("ExposureNotification", "ExposureData");

public static readonly EventType[] All = new EventType[] {
ExposureNotified,
ExposureData,
ExposureNotified
};

public string Type { get; }
Expand All @@ -50,10 +48,7 @@ public interface ISendEventLogStateRepository

SendEventLogState GetSendEventLogState(EventType eventType);

public static bool IsExistNotSetEventType(ISendEventLogStateRepository sendEventLogStateRepository)
=> EventType.All
.Select(eventType => sendEventLogStateRepository.GetSendEventLogState(eventType))
.Any(state => state == SendEventLogState.NotSet);
bool IsExistNotSetEventType();
}

public class SendEventLogStateRepository : ISendEventLogStateRepository
Expand Down Expand Up @@ -154,5 +149,12 @@ public void SetSendEventLogState(EventType eventType, SendEventLogState state)

}
}

public bool IsExistNotSetEventType()
{
return EventType.All
.Select(eventType => GetSendEventLogState(eventType))
.Any(state => state == SendEventLogState.NotSet);
}
}
}
163 changes: 145 additions & 18 deletions Covid19Radar/Covid19Radar/Resources/AppResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 53fe646

Please sign in to comment.