1
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user