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

Commit

Permalink
プッシュ通知に関するメッセージを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
cucmberium committed Nov 26, 2017
1 parent 78b3c59 commit 313beea
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Flantter.MilkyWay.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2005
VisualStudioVersion = 15.0.27004.2009
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Flantter.MilkyWay", "Flantter.MilkyWay\Flantter.MilkyWay.csproj", "{F20B52B9-B500-4BC9-BFFF-46F99987BEED}"
EndProject
Expand Down
1 change: 1 addition & 0 deletions Flantter.MilkyWay/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<converters:IntToStringConverter x:Key="IntToStringConverter"/>
<converters:ColorCodeToBrushConverter x:Key="ColorCodeToBrushConverter"/>
<converters:PlatformEnumToVisibilityConverter x:Key="PlatformEnumToVisibilityConverter"/>
<converters:NullableBooleanToBooleanConverter x:Key="NullableBooleanToBooleanConverter"/>

<notice:NoticeProvider x:Key="Notice"/>
</ResourceDictionary>
Expand Down
3 changes: 2 additions & 1 deletion Flantter.MilkyWay/Flantter.MilkyWay.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@
<Compile Include="Views\Controls\PullToRefreshListView.cs" />
<Compile Include="Views\Controls\TriangleButton.cs" />
<Compile Include="Views\Controls\VerticalBar.cs" />
<Compile Include="Views\Converters\NullableBooleanToBooleanConverter.cs" />
<Compile Include="Views\Converters\BooleanNegationConverter.cs" />
<Compile Include="Views\Converters\BooleanNegationToVisibilityConverter.cs" />
<Compile Include="Views\Converters\BooleanToVisibilityConverter.cs" />
Expand Down Expand Up @@ -474,7 +475,7 @@
<Version>3.1.1</Version>
</PackageReference>
<PackageReference Include="TootNet">
<Version>1.0.5</Version>
<Version>1.0.6</Version>
</PackageReference>
<PackageReference Include="ToriatamaText">
<Version>1.1.0</Version>
Expand Down
3 changes: 3 additions & 0 deletions Flantter.MilkyWay/String/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -1096,4 +1096,7 @@
<data name="Tweet_Text_ReadMore.Text" xml:space="preserve">
<value>Read more</value>
</data>
<data name="SettingsFlyout_Settings_Advanced_BackgroundNotification_Permission_Textblock.Text" xml:space="preserve">
<value>Some settings are sent to Flantter's server when push notification is enabled.</value>
</data>
</root>
3 changes: 3 additions & 0 deletions Flantter.MilkyWay/String/ja-JP/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -1096,4 +1096,7 @@
<data name="Tweet_Text_ReadMore.Text" xml:space="preserve">
<value>続きを見る</value>
</data>
<data name="SettingsFlyout_Settings_Advanced_BackgroundNotification_Permission_Textblock.Text" xml:space="preserve">
<value>プッシュ通知を有効にすると一部の設定がFlantterのサーバーに送信されます。</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<ScrollViewer Background="{StaticResource SettingsFlyoutBackgroundBrush}" VerticalScrollBarVisibility="Auto">
<StackPanel>

<TextBlock x:Uid="SettingsFlyout_Settings_Advanced_BackgroundNotification_Permission_Textblock" Foreground="{StaticResource SettingsFlyoutTextblockForegroundBrush}" Margin="10" TextWrapping="Wrap" Text="プッシュ通知を有効にすると一部の設定がFlantterのサーバーに送信されます。"/>

<controls:HorizontalBar/>

<ToggleSwitch x:Uid="SettingsFlyout_Settings_Advanced_BackgroundNotification_ToggleSwitch" Margin="10" HorizontalAlignment="Stretch" Foreground="{StaticResource SettingsFlyoutTextblockForegroundBrush}" IsOn="{Binding Source={StaticResource Setting}, Path=Setting.PushNotification, Mode=TwoWay}" Header="プッシュ通知"/>

<controls:HorizontalBar/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using Windows.UI.Xaml.Data;

namespace Flantter.MilkyWay.Views.Converters
{
public sealed class NullableBooleanToBooleanConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
return (bool?)(value is bool b && b);
}

public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}
}
2 changes: 1 addition & 1 deletion Flantter.MilkyWay/Views/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<behaviors:ShareDataBehavior Messenger="{x:Bind ViewModel.ShowShareUIMessenger}"/>

<behaviors:AppBarShowBehavior IsOpen="{x:Bind ViewModel.AppBarIsOpen.Value, Mode=TwoWay}" IsTopAppBar="{x:Bind ViewModel.Setting.ShowAppBarToTop, Mode=OneWay}">
<behaviors:AppBarShowBehavior IsOpen="{x:Bind ViewModel.AppBarIsOpen.Value, Mode=TwoWay}" IsTopAppBar="{x:Bind ViewModel.Setting.ShowAppBarToTop, Mode=OneWay, Converter={StaticResource NullableBooleanToBooleanConverter}}">
<behaviors:AppBarShowBehavior.AppBar>
<AppBar Style="{StaticResource ExpandedAppBar}" ClosedDisplayMode="Hidden" IsSticky="False" BorderBrush="{StaticResource AppBarBorderBrush}">
<contents:TweetArea ViewModel="{x:Bind ViewModel.TweetArea, Mode=OneWay}" />
Expand Down

0 comments on commit 313beea

Please sign in to comment.