@ -198,6 +198,12 @@ export default { 
			
		
	
		
			
				
							} ,  
			
		
	
		
			
				
						} ,  
			
		
	
		
			
				
					
 
			
		
	
		
			
				
						data :  ( )  =>  {  
			
		
	
		
			
				
							return  {  
			
		
	
		
			
				
								unreadNotificationHandle :  null ,  
			
		
	
		
			
				
							}  
			
		
	
		
			
				
						} ,  
			
		
	
		
			
				
					
 
			
		
	
		
			
				
						computed :  {  
			
		
	
		
			
				
							isFullscreen ( )  {  
			
		
	
		
			
				
								return  this . $store . getters . isFullscreen ( )  
			
		
	
	
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
				
				@ -319,8 +325,8 @@ export default { 
			
		
	
		
			
				
								}  
			
		
	
		
			
				
					
 
			
		
	
		
			
				
								/ /   n e w   m e s s a g e s   a r r i v e d  
			
		
	
		
			
				
								if  ( newValue  >  0  &&  oldValue  ===  0 )  {  
			
		
	
		
			
				
									showMessage ( t ( 'spreed' ,  'You have new unread messages in the chat.' ) )  
			
		
	
		
			
				
								if  ( newValue  >  0  &&  oldValue  ===  0  &&  ! this . hasUnreadMentions  )  {  
			
		
	
		
			
				
									this . notifyUnreadMessages ( t ( 'spreed' ,  'You have new unread messages in the chat.' ) )  
			
		
	
		
			
				
								}  
			
		
	
		
			
				
							} ,  
			
		
	
		
			
				
					
 
			
		
	
	
		
			
				
					
						
						
						
							
								 
						
					 
				
				@ -329,9 +335,15 @@ export default { 
			
		
	
		
			
				
									return  
			
		
	
		
			
				
								}  
			
		
	
		
			
				
					
 
			
		
	
		
			
				
								/ /   p r e v e n t   d u p l i c a t e   n o t i f i c a t i o n   c a u s e d   b y   u n r e a d M e s s a g e s C o u n t e r   i n   c a s e   o f   m e n t i o n  
			
		
	
		
			
				
								if  ( newValue  &&  this . unreadMessagesCounter  >  0 )  {  
			
		
	
		
			
				
									showMessage ( t ( 'spreed' ,  'You have been mentioned in the chat.' ) )  
			
		
	
		
			
				
								if  ( newValue )  {  
			
		
	
		
			
				
									this . notifyUnreadMessages ( t ( 'spreed' ,  'You have been mentioned in the chat.' ) )  
			
		
	
		
			
				
								}  
			
		
	
		
			
				
							} ,  
			
		
	
		
			
				
					
 
			
		
	
		
			
				
							isInCall ( newValue )  {  
			
		
	
		
			
				
								if  ( ! newValue )  {  
			
		
	
		
			
				
									/ /   d i s c a r d   n o t i f i c a t i o n   i f   t h e   c a l l   e n d s  
			
		
	
		
			
				
									this . notifyUnreadMessages ( null )  
			
		
	
		
			
				
								}  
			
		
	
		
			
				
							} ,  
			
		
	
		
			
				
						} ,  
			
		
	
	
		
			
				
					
						
						
						
							
								 
						
					 
				
				@ -344,6 +356,7 @@ export default { 
			
		
	
		
			
				
						} ,  
			
		
	
		
			
				
					
 
			
		
	
		
			
				
						beforeDestroy ( )  {  
			
		
	
		
			
				
							this . notifyUnreadMessages ( null )  
			
		
	
		
			
				
							document . removeEventListener ( 'fullscreenchange' ,  this . fullScreenChanged ,  false )  
			
		
	
		
			
				
							document . removeEventListener ( 'mozfullscreenchange' ,  this . fullScreenChanged ,  false )  
			
		
	
		
			
				
							document . removeEventListener ( 'MSFullscreenChange' ,  this . fullScreenChanged ,  false )  
			
		
	
	
		
			
				
					
						
						
						
							
								 
						
					 
				
				@ -351,6 +364,16 @@ export default { 
			
		
	
		
			
				
						} ,  
			
		
	
		
			
				
					
 
			
		
	
		
			
				
						methods :  {  
			
		
	
		
			
				
							notifyUnreadMessages ( message )  {  
			
		
	
		
			
				
								if  ( this . unreadNotificationHandle )  {  
			
		
	
		
			
				
									this . unreadNotificationHandle . hideToast ( )  
			
		
	
		
			
				
									this . unreadNotificationHandle  =  null  
			
		
	
		
			
				
								}  
			
		
	
		
			
				
								if  ( message )  {  
			
		
	
		
			
				
									this . unreadNotificationHandle  =  showMessage ( message )  
			
		
	
		
			
				
								}  
			
		
	
		
			
				
							} ,  
			
		
	
		
			
				
					
 
			
		
	
		
			
				
							openSidebar ( )  {  
			
		
	
		
			
				
								this . $store . dispatch ( 'showSidebar' )  
			
		
	
		
			
				
								BrowserStorage . setItem ( 'sidebarOpen' ,  'true' )