feat: 补充我的页内容区块

This commit is contained in:
Zhou Weidong committed 2026-10-22 21:44:03 +08:00
1 parent 7971ac18fc
commit 9953c955e3
23 files changed
+800 -9

No files matched your search

+7
View File
@@ -20,6 +20,7 @@ class HomeLogic extends ChangeNotifier {
int searchRequest = 0;
int resumeRequest = 0;
int backRequest = 0;
int followingHistoryRequest = 0;
bool drawerOpen = false;
bool detailOpen = false;
bool videoImmersive = false;
@@ -100,6 +101,12 @@ class HomeLogic extends ChangeNotifier {
).push(MaterialPageRoute<void>(builder: (_) => const WatchRecordsPage()));
}
void openFollowingHistory() {
tab = 2;
followingHistoryRequest += 1;
notify();
}
void myAction(MyPageAction action) {
switch (action) {
case MyPageAction.home:
+8 -3
View File
@@ -263,6 +263,7 @@ class _HomeTabsState extends State<_HomeTabs> {
FollowingPage(
onGoHome: () => logic.select(0),
favoriteController: context.read<FavoriteController>(),
historyRequest: logic.followingHistoryRequest,
),
_my(context),
],
@@ -312,14 +313,18 @@ class _HomeTabsState extends State<_HomeTabs> {
Future<void> _openWallet(BuildContext context) async {
if (!await ensureSignedIn(context) || !context.mounted) return;
await Navigator.of(context)
.push<void>(MaterialPageRoute(builder: (_) => const WalletPage()));
await Navigator.of(
context,
).push<void>(MaterialPageRoute(builder: (_) => const WalletPage()));
}
Widget _my(BuildContext context) {
return MyPage(
active: logic.tab == 3,
callbacks: MyPageCallbacks(onAction: logic.myAction),
callbacks: MyPageCallbacks(
onAction: logic.myAction,
onOpenHistoryTab: logic.openFollowingHistory,
),
);
}