You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
	
	
		
			
				
					
						
							|  |  |  | /* global Whisper */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // eslint-disable-next-line func-names
 | 
					
						
							|  |  |  | (function() { | 
					
						
							|  |  |  |   'use strict'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   window.Whisper = window.Whisper || {}; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   Whisper.SessionToggleView = Whisper.View.extend({ | 
					
						
							|  |  |  |     initialize(options) { | 
					
						
							|  |  |  |       this.props = { | 
					
						
							|  |  |  |         active: options.active, | 
					
						
							|  |  |  |       }; | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     render() { | 
					
						
							|  |  |  |       this.toggleView = new Whisper.ReactWrapperView({ | 
					
						
							|  |  |  |         className: 'session-toggle-wrapper', | 
					
						
							|  |  |  |         Component: window.Signal.Components.SessionToggle, | 
					
						
							|  |  |  |         props: this.props, | 
					
						
							|  |  |  |       }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       this.$el.append(this.toggleView.el); | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     toggle() { | 
					
						
							|  |  |  |       this.props.active = !this.props.active; | 
					
						
							|  |  |  |       this.toggleView.update(this.props); | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | })(); |