mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 21:26:57 +02:00
Public rooms search: Keep the search bar cancel button enabled when the keyboard is not displayed.
Thus, the user can quit the search more quickly
This commit is contained in:
@@ -532,6 +532,24 @@
|
||||
[self hideSearch:YES];
|
||||
}
|
||||
|
||||
- (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar2
|
||||
{
|
||||
// Keep the search bar cancel button enabled even if the keyboard is not displayed
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
for (UIView *subView in searchBar.subviews)
|
||||
{
|
||||
for (UIView *view in subView.subviews)
|
||||
{
|
||||
if ([view isKindOfClass:[UIButton class]])
|
||||
{
|
||||
[(UIButton *)view setEnabled:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return YES;
|
||||
}
|
||||
|
||||
#pragma mark - MXKRecentListViewControllerDelegate
|
||||
|
||||
- (void)recentListViewController:(MXKRecentListViewController *)recentListViewController didSelectRoom:(NSString *)roomId inMatrixSession:(MXSession *)matrixSession
|
||||
|
||||
Reference in New Issue
Block a user