This commit is contained in:
2025-11-10 15:38:30 +08:00
parent 97316c7989
commit 1cdc17b710
18 changed files with 337 additions and 20 deletions

View File

@@ -285,7 +285,7 @@ typedef NS_ENUM(NSInteger, KBSearchSection) {
if (indexPath.section == KBSearchSectionHistory) {
// sizeForHeader 0
[header configWithTitle:@"Historical Search" showTrash:self.historyWords.count > 0];
__weak typeof(self) weakSelf = self;
KBWeakSelf
header.onTapTrash = ^{ [weakSelf clearHistory]; };
} else {
[header configWithTitle:@"Recommended Skin" showTrash:NO];
@@ -363,7 +363,7 @@ typedef NS_ENUM(NSInteger, KBSearchSection) {
if (!_searchBarView) {
_searchBarView = [[KBSearchBarView alloc] init];
_searchBarView.placeholder = @"Themes";
__weak typeof(self) weakSelf = self;
KBWeakSelf
_searchBarView.onSearch = ^(NSString * _Nonnull keyword) {
// +
[weakSelf performSearch:keyword];