mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-04 05:53:21 +00:00 
			
		
		
		
	silent: Reflect changes in webview for silent option. (#380)
* silent: Reflect changes in webview for mute/silent option. This silent the webview incase silent option is toggled, and by default silent the webview when its create if needed. Fixes: #380.
This commit is contained in:
		@@ -277,6 +277,20 @@ class ServerManagerView {
 | 
			
		||||
			const webContents = webview.getWebContents();
 | 
			
		||||
			webContents.send('toggle-sidebar', state);
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		ipcRenderer.on('toogle-silent', (event, state) => {
 | 
			
		||||
			const webviews = document.querySelectorAll('webview');
 | 
			
		||||
			webviews.forEach(webview => {
 | 
			
		||||
				try {
 | 
			
		||||
					webview.setAudioMuted(state);
 | 
			
		||||
				} catch (err) {
 | 
			
		||||
					// webview is not ready yet
 | 
			
		||||
					webview.addEventListener('dom-ready', () => {
 | 
			
		||||
						webview.isAudioMuted();
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	destroyTab(name, index) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user