feat: 隐藏热搜热榜的功能 issues#35
This commit is contained in:
@ -21,6 +21,8 @@ class SSearchController extends GetxController {
|
||||
Debouncer(delay: const Duration(milliseconds: 200)); // 设置延迟时间
|
||||
String hintText = '搜索';
|
||||
RxString defaultSearch = '输入关键词搜索'.obs;
|
||||
Box setting = GStrorage.setting;
|
||||
bool enableHotKey = true;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
@ -38,6 +40,7 @@ class SSearchController extends GetxController {
|
||||
}
|
||||
historyCacheList = histiryWord.get('cacheList') ?? [];
|
||||
historyList.value = historyCacheList;
|
||||
enableHotKey = setting.get(SettingBoxKey.enableHotKey, defaultValue: true);
|
||||
}
|
||||
|
||||
void onChange(value) {
|
||||
|
||||
@ -146,7 +146,9 @@ class _SearchPageState extends State<SearchPage> with RouteAware {
|
||||
// 搜索建议
|
||||
_searchSuggest(),
|
||||
// 热搜
|
||||
hotSearch(_searchController),
|
||||
Visibility(
|
||||
visible: _searchController.enableHotKey,
|
||||
child: hotSearch(_searchController)),
|
||||
// 搜索历史
|
||||
_history()
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user