mirror of https://github.com/vector-im/riot-web
				
				
				
			Decouple Audible notifications from Desktop notifications
							parent
							
								
									d7229064c4
								
							
						
					
					
						commit
						c1e152dba2
					
				|  | @ -279,7 +279,8 @@ export const Notifier = { | |||
|     }, | ||||
| 
 | ||||
|     isAudioEnabled: function() { | ||||
|         return this.isEnabled() && SettingsStore.getValue("audioNotificationsEnabled"); | ||||
|         // We don't route Audio via the HTML Notifications API so it is possible regardless of other things
 | ||||
|         return SettingsStore.getValue("audioNotificationsEnabled"); | ||||
|     }, | ||||
| 
 | ||||
|     setToolbarHidden: function(hidden: boolean, persistent = true) { | ||||
|  |  | |||
|  | @ -19,7 +19,6 @@ import { MatrixClient } from 'matrix-js-sdk/src/client'; | |||
| 
 | ||||
| import { _td } from '../languageHandler'; | ||||
| import { | ||||
|     AudioNotificationsEnabledController, | ||||
|     NotificationBodyEnabledController, | ||||
|     NotificationsEnabledController, | ||||
| } from "./controllers/NotificationControllers"; | ||||
|  | @ -460,7 +459,6 @@ export const SETTINGS: {[setting: string]: ISetting} = { | |||
|     "audioNotificationsEnabled": { | ||||
|         supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS, | ||||
|         default: true, | ||||
|         controller: new AudioNotificationsEnabledController(), | ||||
|     }, | ||||
|     "enableWidgetScreenshots": { | ||||
|         supportedLevels: LEVELS_ACCOUNT_SETTINGS, | ||||
|  |  | |||
|  | @ -79,12 +79,3 @@ export class NotificationBodyEnabledController extends SettingController { | |||
|         return calculatedValue; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| export class AudioNotificationsEnabledController extends SettingController { | ||||
|     public getValueOverride(level: SettingLevel, roomId: string, calculatedValue: any): any { | ||||
|         if (!getNotifier().isPossible()) return false; | ||||
| 
 | ||||
|         // Note: Audio notifications are *not* enabled by default.
 | ||||
|         return calculatedValue; | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Michael Telatynski
						Michael Telatynski