mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 16:18:22 +08:00
@@ -24,25 +24,25 @@ class SSearchController extends GetxController {
|
||||
int initIndex = 0;
|
||||
|
||||
// uid
|
||||
RxBool showUidBtn = false.obs;
|
||||
final RxBool showUidBtn = false.obs;
|
||||
late final digitOnlyRegExp = RegExp(r'^\d+$');
|
||||
|
||||
// history
|
||||
late final RxBool recordSearchHistory = Pref.recordSearchHistory.obs;
|
||||
final RxBool recordSearchHistory = Pref.recordSearchHistory.obs;
|
||||
late final RxList<String> historyList;
|
||||
|
||||
// suggestion
|
||||
late final bool searchSuggestion = Pref.searchSuggestion;
|
||||
final bool searchSuggestion = Pref.searchSuggestion;
|
||||
StreamController<String>? _ctr;
|
||||
StreamSubscription<String>? _sub;
|
||||
late final RxList<SearchSuggestItem> searchSuggestList;
|
||||
|
||||
// trending
|
||||
late final bool enableHotKey = Pref.enableHotKey;
|
||||
final bool enableHotKey = Pref.enableHotKey;
|
||||
late final Rx<LoadingState<SearchTrendingData>> loadingState;
|
||||
|
||||
// rcmd
|
||||
late final bool enableSearchRcmd = Pref.enableSearchRcmd;
|
||||
final bool enableSearchRcmd = Pref.enableSearchRcmd;
|
||||
late final Rx<LoadingState<SearchRcmdData>> recommendData;
|
||||
|
||||
@override
|
||||
|
||||
@@ -73,35 +73,33 @@ class _SearchPageState extends State<SearchPage> {
|
||||
onSubmitted: (value) => _searchController.submit(),
|
||||
),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
body: ListView(
|
||||
padding: MediaQuery.paddingOf(context).copyWith(top: 0),
|
||||
child: Column(
|
||||
children: [
|
||||
if (_searchController.searchSuggestion) _searchSuggest(),
|
||||
if (context.orientation == Orientation.portrait) ...[
|
||||
if (_searchController.enableHotKey) hotSearch(theme),
|
||||
_history(theme),
|
||||
if (_searchController.enableSearchRcmd) hotSearch(theme, false)
|
||||
] else
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (_searchController.enableHotKey ||
|
||||
_searchController.enableSearchRcmd)
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
if (_searchController.enableHotKey) hotSearch(theme),
|
||||
if (_searchController.enableSearchRcmd)
|
||||
hotSearch(theme, false)
|
||||
],
|
||||
),
|
||||
children: [
|
||||
if (_searchController.searchSuggestion) _searchSuggest(),
|
||||
if (context.orientation == Orientation.portrait) ...[
|
||||
if (_searchController.enableHotKey) hotSearch(theme),
|
||||
_history(theme),
|
||||
if (_searchController.enableSearchRcmd) hotSearch(theme, false)
|
||||
] else
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (_searchController.enableHotKey ||
|
||||
_searchController.enableSearchRcmd)
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
if (_searchController.enableHotKey) hotSearch(theme),
|
||||
if (_searchController.enableSearchRcmd)
|
||||
hotSearch(theme, false)
|
||||
],
|
||||
),
|
||||
Expanded(child: _history(theme)),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(child: _history(theme)),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user