diff --git a/CHANGES.rst b/CHANGES.rst index 4f9ab91a1..3bb978f30 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -17,7 +17,8 @@ Changes to be released in next version * Use different title for scan button for self verification (#4525). * it's easy for the back button to trigger a leftpanel reveal (#4438). * Show / hide reset button in secrets recovery screen (#4546). - * Timeline: Fix incorrect crop of media thumbnails. + * Share Extension: Fix layout when searching (#4258). + * Timeline: Fix incorrect crop of media thumbnails (#4552). ⚠️ API Changes * diff --git a/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.m b/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.m index 777249a6e..94acaa453 100644 --- a/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.m +++ b/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.m @@ -129,6 +129,13 @@ } } +- (void)setKeyboardHeight:(CGFloat)keyboardHeight +{ + // Bypass inherited keyboard handling to fix layout when searching. + // There are no sticky headers to worry about updating. + return; +} + #pragma mark - Private - (void)showShareAlertForRoomPath:(NSIndexPath *)indexPath @@ -289,6 +296,12 @@ // Refresh display [self refreshRecentsTable]; } + + // Dismiss the keyboard when scrolling to match the behaviour of the main app. + if (self.recentsSearchBar.isFirstResponder) + { + [self.recentsSearchBar resignFirstResponder]; + } } } } diff --git a/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.xib b/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.xib index 630d940a3..bc77d3275 100644 --- a/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.xib +++ b/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.xib @@ -1,11 +1,9 @@ - - - - + + - + @@ -39,7 +37,6 @@ - @@ -49,6 +46,7 @@ +