feat: 统一首页与推荐搜索入口

This commit is contained in:
Zhou Weidong committed 2026-10-22 22:48:21 +08:00
1 parent 933333b0fe
commit 9aa797504b
18 files changed
+325 -107

No files matched your search

+3 -5
View File
@@ -17,7 +17,6 @@ class HomeLogic extends ChangeNotifier {
final scaffoldKey = GlobalKey<ScaffoldState>();
Drama currentDrama;
int tab = 0;
int searchRequest = 0;
int resumeRequest = 0;
int backRequest = 0;
int followingHistoryRequest = 0;
@@ -31,10 +30,9 @@ class HomeLogic extends ChangeNotifier {
if (!_disposed) notifyListeners();
}
void select(int nextTab, {bool search = false, bool resume = false}) {
void select(int nextTab, {bool resume = false}) {
FocusManager.instance.primaryFocus?.unfocus();
tab = nextTab;
if (search) searchRequest++;
if (resume) resumeRequest++;
notify();
}
@@ -81,7 +79,7 @@ class HomeLogic extends ChangeNotifier {
case DiscoverPageAction.home:
select(0);
case DiscoverPageAction.recommend:
select(1, search: true);
select(1);
case DiscoverPageAction.following:
select(2);
case DiscoverPageAction.mine:
@@ -112,7 +110,7 @@ class HomeLogic extends ChangeNotifier {
case MyPageAction.home:
select(0);
case MyPageAction.recommend:
select(1, search: true);
select(1);
case MyPageAction.following:
select(2);
case MyPageAction.mine: