mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
Update filter placeholder and icon (#5520)
* Update filter placeholder and icon * Use SwiftGen asset helper & add filter_on icon Co-authored-by: Arnaud Ringenbach <arnaud.ringenbach@niji.fr>
This commit is contained in:
@@ -121,7 +121,11 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
tableSearchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 600, 44)];
|
||||
tableSearchBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
|
||||
tableSearchBar.showsCancelButton = NO;
|
||||
tableSearchBar.placeholder = [VectorL10n searchDefaultPlaceholder];
|
||||
tableSearchBar.placeholder = [VectorL10n searchFilterPlaceholder];
|
||||
[tableSearchBar setImage:AssetImages.filterOff.image
|
||||
forSearchBarIcon:UISearchBarIconSearch
|
||||
state:UIControlStateNormal];
|
||||
|
||||
tableSearchBar.delegate = self;
|
||||
|
||||
displayedSectionHeaders = [NSMutableArray array];
|
||||
@@ -169,8 +173,11 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
}];
|
||||
|
||||
self.recentsSearchBar.autocapitalizationType = UITextAutocapitalizationTypeNone;
|
||||
self.recentsSearchBar.placeholder = [VectorL10n searchDefaultPlaceholder];
|
||||
|
||||
self.recentsSearchBar.placeholder = [VectorL10n searchFilterPlaceholder];
|
||||
[self.recentsSearchBar setImage:AssetImages.filterOff.image
|
||||
forSearchBarIcon:UISearchBarIconSearch
|
||||
state:UIControlStateNormal];
|
||||
|
||||
// Observe user interface theme change.
|
||||
kThemeServiceDidChangeThemeNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kThemeServiceDidChangeThemeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
|
||||
|
||||
@@ -2193,6 +2200,16 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
[self.recentsSearchBar setShowsCancelButton:NO animated:NO];
|
||||
}
|
||||
|
||||
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
|
||||
{
|
||||
[super searchBar:searchBar textDidChange:searchText];
|
||||
|
||||
UIImage *filterIcon = searchText.length > 0 ? AssetImages.filterOn.image : AssetImages.filterOff.image;
|
||||
[self.recentsSearchBar setImage:filterIcon
|
||||
forSearchBarIcon:UISearchBarIconSearch
|
||||
state:UIControlStateNormal];
|
||||
}
|
||||
|
||||
#pragma mark - CreateRoomCoordinatorBridgePresenterDelegate
|
||||
|
||||
- (void)createRoomCoordinatorBridgePresenterDelegate:(CreateRoomCoordinatorBridgePresenter *)coordinatorBridgePresenter didCreateNewRoom:(MXRoom *)room
|
||||
|
||||
Reference in New Issue
Block a user