public async void ChangePushNotificationSettings(object sender, RoutedEventArgs e) { if (sender is ToggleSwitch ts && Config.NotificationsEnabled) { _settingsService.SetSetting(nameof(PushNotificationsEnabled), ts.IsOn, SettingLocality.Local); if (ts.IsOn) { PushNotificationsEnabled = await _pushNotificationService.EnablePushNotifications(); } else { await _pushNotificationService.DisablePushNotificaitons(); } } }