Merge branch 'prod'

This commit is contained in:
Pedro Pinto committed 2018-10-31 13:31:36 +00:00
commit 930f74ff27
4 files changed
+25 -14

No files matched your search

+12 -8
View File
@@ -53,18 +53,22 @@ namespace mbts.ui {
ToastNotificationController _toast_controller;
SoundNotificationPlayer _sound_player;
Dispatcher _dispatcher;
bool _toast_notifications_enabled, _sound_notifications_enabled = NotificationSettings.Default.sound_notification.enabled;
bool
_sound_notifications_enabled = Configuration.get<bts.config.toggles.SoundNotifications>().enabled,
_toast_notifications_enabled = Configuration.get<bts.config.toggles.ToastNotifications>().enabled;
[ImportingConstructor]
public Notifier(IBus bus, UserSettingsHub settings_hub) {
_disposer = new ThreadSafeDisposable(dispose_core);
Thread thread = new Thread(start) {
IsBackground = true,
Priority = ThreadPriority.BelowNormal,
Name = "BTSNotifications"
};
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
if (_sound_notifications_enabled || _toast_notifications_enabled) {
Thread thread = new Thread(start) {
IsBackground = true,
Priority = ThreadPriority.BelowNormal,
Name = "BTSNotifications"
};
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
}
void start() {
try {
+8 -6
View File
@@ -521,12 +521,14 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ItemsControl}">
<Border
BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"
>
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
<Border
BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"
>
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</ScrollViewer>
</ControlTemplate>
</Setter.Value>
</Setter>
+1
View File
@@ -4,6 +4,7 @@
<TargetFrameworks>netstandard2.0;net471</TargetFrameworks>
<OutputType>Exe</OutputType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>$(OutputPath)\net471</PackageOutputPath>
<IncludeSource>true</IncludeSource>
<IncludeSymbols>true</IncludeSymbols>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
+4
View File
@@ -28,6 +28,10 @@ message ToastNotifications {
optional bool enabled = 1 [default = false];
}
message SoundNotifications {
optional bool enabled = 1 [default = true];
}
message VolumeAtPrice{
optional bool enabled = 1 [default = true];
}