MOBILE-2457 messages: Fix bottom padding when keyboard is shown
This commit is contained in:
		
							parent
							
								
									ef20b3c3dd
								
							
						
					
					
						commit
						c2e310e737
					
				@ -52,6 +52,7 @@ export class AddonMessagesDiscussionPage implements OnDestroy {
 | 
				
			|||||||
    protected keepMessageMap = {};
 | 
					    protected keepMessageMap = {};
 | 
				
			||||||
    protected syncObserver: any;
 | 
					    protected syncObserver: any;
 | 
				
			||||||
    protected oldContentHeight = 0;
 | 
					    protected oldContentHeight = 0;
 | 
				
			||||||
 | 
					    protected keyboardObserver: any;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    userId: number;
 | 
					    userId: number;
 | 
				
			||||||
    currentUserId: number;
 | 
					    currentUserId: number;
 | 
				
			||||||
@ -178,6 +179,11 @@ export class AddonMessagesDiscussionPage implements OnDestroy {
 | 
				
			|||||||
                this.loaded = true;
 | 
					                this.loaded = true;
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // Recalculate footer position when keyboard is shown or hidden.
 | 
				
			||||||
 | 
					        this.keyboardObserver = this.eventsProvider.on(CoreEventsProvider.KEYBOARD_CHANGE, (isOn) => {
 | 
				
			||||||
 | 
					            this.content.resize();
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
@ -692,6 +698,7 @@ export class AddonMessagesDiscussionPage implements OnDestroy {
 | 
				
			|||||||
        // Unset again, just in case.
 | 
					        // Unset again, just in case.
 | 
				
			||||||
        this.unsetPolling();
 | 
					        this.unsetPolling();
 | 
				
			||||||
        this.syncObserver && this.syncObserver.off();
 | 
					        this.syncObserver && this.syncObserver.off();
 | 
				
			||||||
 | 
					        this.keyboardObserver && this.keyboardObserver.off();
 | 
				
			||||||
        this.viewDestroyed = true;
 | 
					        this.viewDestroyed = true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user