@ -182,7 +182,7 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat
 
		
	
		
			
				        addOrRemoveBlockedBanner ( ) 
 
		
	
		
			
				        //   N o t i f i c a t i o n s 
 
		
	
		
			
				        let  notificationCenter  =  NotificationCenter . default 
 
		
	
		
			
				        notificationCenter . addObserver ( self ,  selector :  #selector ( handleKeyboardWillChangeFrameNotification ( _ : ) ) ,  name :  UIResponder . keyboardWill ChangeFrame Notification,  object :  nil ) 
 
		
	
		
			
				        notificationCenter . addObserver ( self ,  selector :  #selector ( handleKeyboardWillChangeFrameNotification ( _ : ) ) ,  name :  UIResponder . keyboardWill Show Notification,  object :  nil ) 
 
		
	
		
			
				        notificationCenter . addObserver ( self ,  selector :  #selector ( handleKeyboardWillHideNotification ( _ : ) ) ,  name :  UIResponder . keyboardWillHideNotification ,  object :  nil ) 
 
		
	
		
			
				        notificationCenter . addObserver ( self ,  selector :  #selector ( handleAudioDidFinishPlayingNotification ( _ : ) ) ,  name :  . SNAudioDidFinishPlaying ,  object :  nil ) 
 
		
	
		
			
				        notificationCenter . addObserver ( self ,  selector :  #selector ( addOrRemoveBlockedBanner ) ,  name :  NSNotification . Name ( rawValue :  kNSNotificationName_BlockListDidChange ) ,  object :  nil ) 
 
		
	
	
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
				
			
			@ -308,14 +308,31 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat
 
		
	
		
			
				            didConstrainScrollButton  =  true 
 
		
	
		
			
				        } 
 
		
	
		
			
				        let  shouldScroll  =  ( newHeight  >  200 )  //   A r b i t r a r y   v a l u e   t h a t ' s   h i g h e r   t h a n   t h e   c o l l a p s e d   s i z e   a n d   l o w e r   t h a n   t h e   e x p a n d e d   s i z e 
 
		
	
		
			
				        print ( " Ryan: keyboardWillChangeFrame, new height:  \( newHeight ) , old height:  \( self . messagesTableView . keyboardHeight ) , contentOffsetY:  \( self . messagesTableView . contentOffset . y ) " ) 
 
		
	
		
			
				        UIView . animate ( withDuration :  0.25 )  { 
 
		
	
		
			
				        let  newContentOffsetY  =  self . messagesTableView . contentOffset . y  +  newHeight  -  self . messagesTableView . keyboardHeight 
 
		
	
		
			
				        print ( " Ryan: keyboardWillChangeFrame, new height:  \( newHeight ) , old height:  \( self . messagesTableView . keyboardHeight ) , contentOffsetY:  \( self . messagesTableView . contentOffset . y )  newContentOffsetY:  \( newContentOffsetY ) " ) 
 
		
	
		
			
				        
 
		
	
		
			
				        if  shouldScroll  { 
 
		
	
		
			
				                 self . messagesTableView . contentOffset . y  +=  ( newHeight  -  self . messagesTableView . keyboardHeight ) 
 
		
	
		
			
				            self . messagesTableView . contentOffset . y  =  newContentOffsetY 
 
		
	
		
			
				            self . messagesTableView . keyboardHeight  =  newHeight 
 
		
	
		
			
				        } 
 
		
	
		
			
				        self . scrollButton . alpha  =  0 
 
		
	
		
			
				        } 
 
		
	
		
			
				//                 U I V i e w . a n i m a t e ( w i t h D u r a t i o n :   0 . 2 5 ,   a n i m a t i o n s :   {  
		
	
		
			
				//                         i f   s h o u l d S c r o l l   {  
		
	
		
			
				//                                 s e l f . m e s s a g e s T a b l e V i e w . c o n t e n t O f f s e t . y   =   n e w C o n t e n t O f f s e t Y  
		
	
		
			
				//                                 s e l f . m e s s a g e s T a b l e V i e w . k e y b o a r d H e i g h t   =   n e w H e i g h t  
		
	
		
			
				//                         }  
		
	
		
			
				//                         s e l f . s c r o l l B u t t o n . a l p h a   =   0  
		
	
		
			
				//                 } ,   c o m p l e t i o n :   { _   i n  
		
	
		
			
				//                         p r i n t ( " R y a n :   k e y b o a r d W i l l C h a n g e F r a m e   * * * E n d   A n i m a t i o n * * * ,   c o n t e n t O f f s e t Y :   \ ( s e l f . m e s s a g e s T a b l e V i e w . c o n t e n t O f f s e t . y ) " )  
		
	
		
			
				//                 } )  
		
	
		
			
				//                 U I V i e w . a n i m a t e ( w i t h D u r a t i o n :   0 . 2 5 )   {  
		
	
		
			
				//                         i f   s h o u l d S c r o l l   {  
		
	
		
			
				//                                 s e l f . m e s s a g e s T a b l e V i e w . c o n t e n t O f f s e t . y   + =   ( n e w H e i g h t   -   s e l f . m e s s a g e s T a b l e V i e w . k e y b o a r d H e i g h t )  
		
	
		
			
				//                                 s e l f . m e s s a g e s T a b l e V i e w . k e y b o a r d H e i g h t   =   n e w H e i g h t  
		
	
		
			
				//                         }  
		
	
		
			
				//                         p r i n t ( " R y a n :   k e y b o a r d W i l l C h a n g e F r a m e   * * * I n   A n i m a t i o n * * * ,   c o n t e n t O f f s e t Y :   \ ( s e l f . m e s s a g e s T a b l e V i e w . c o n t e n t O f f s e t . y ) " )  
		
	
		
			
				//                         s e l f . s c r o l l B u t t o n . a l p h a   =   0  
		
	
		
			
				//                 }  
		
	
		
			
				        print ( " Ryan: keyboardWillChangeFrame, contentOffsetY:  \( self . messagesTableView . contentOffset . y ) " ) 
 
		
	
		
			
				    } 
 
		
	
		
			
				    
 
		
	
	
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
				
			
			@ -472,6 +489,7 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat
 
		
	
		
			
				    } 
 
		
	
		
			
				    
 
		
	
		
			
				    func  scrollViewDidScroll ( _  scrollView :  UIScrollView )  { 
 
		
	
		
			
				        print ( " Ryan: scrollViewDidScroll contentOffsetY:  \( scrollView . contentOffset . y ) " ) 
 
		
	
		
			
				        scrollButton . alpha  =  getScrollButtonOpacity ( ) 
 
		
	
		
			
				        unreadCountView . alpha  =  scrollButton . alpha 
 
		
	
		
			
				        autoLoadMoreIfNeeded ( )