diff --git a/src/client/spark/Notifications/INotifier.cs b/src/client/spark/Notifications/INotifier.cs index 37f1f25ab..296154b18 100644 --- a/src/client/spark/Notifications/INotifier.cs +++ b/src/client/spark/Notifications/INotifier.cs @@ -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().enabled, + _toast_notifications_enabled = Configuration.get().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 { diff --git a/src/client/spark/Themes/generic.xaml b/src/client/spark/Themes/generic.xaml index 91e013661..65f1bb5a1 100644 --- a/src/client/spark/Themes/generic.xaml +++ b/src/client/spark/Themes/generic.xaml @@ -521,12 +521,14 @@ - - - + + + + + diff --git a/src/client/spark_sdk/spark_sdk.csproj b/src/client/spark_sdk/spark_sdk.csproj index d25a75767..2de7adb76 100644 --- a/src/client/spark_sdk/spark_sdk.csproj +++ b/src/client/spark_sdk/spark_sdk.csproj @@ -4,6 +4,7 @@ netstandard2.0;net471 Exe true + $(OutputPath)\net471 true true $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage diff --git a/src/lib/config/protos/toggles.proto b/src/lib/config/protos/toggles.proto index d940fa416..5e1fbd736 100644 --- a/src/lib/config/protos/toggles.proto +++ b/src/lib/config/protos/toggles.proto @@ -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]; } \ No newline at end of file