refactor(ui): 清理 K26 旧 UI 与死代码

This commit is contained in:
Zhou Weidong committed 2026-10-19 15:58:22 +08:00
1 parent a5398daab3
commit 5422581f8b
23 files changed
+291 -1225

No files matched your search

+5 -18
View File
@@ -49,21 +49,20 @@ class HomeLogic extends ChangeNotifier {
notify();
}
void openMenu() {
drawerOpen = true;
void setMenuOpen(bool value) {
if (drawerOpen == value) return;
drawerOpen = value;
notify();
scaffoldKey.currentState?.openDrawer();
}
void selectFromMenu(int nextTab, {int? mySection}) {
scaffoldKey.currentState?.closeDrawer();
drawerOpen = false;
select(nextTab, mySection: mySection);
}
Future<void> openCurrentSeries(BuildContext context) async {
detailOpen = true;
notify();
scaffoldKey.currentState?.closeDrawer();
await WidgetsBinding.instance.endOfFrame;
if (!context.mounted) return;
try {
@@ -102,13 +101,11 @@ class HomeLogic extends ChangeNotifier {
void openProfile() {
profile = true;
scaffoldKey.currentState?.closeDrawer();
select(2, mySection: 0);
}
void openLibrary({int section = 1}) {
profile = false;
scaffoldKey.currentState?.closeDrawer();
select(2, mySection: section);
}
@@ -139,24 +136,14 @@ class HomeLogic extends ChangeNotifier {
}
void onSystemBack() {
if (drawerOpen) {
scaffoldKey.currentState?.closeDrawer();
} else if (videoImmersive) {
if (videoImmersive) {
backRequest++;
notify();
} else if (tab != 1) {
select(1);
} else {
openMenu();
}
}
void onDrawerChanged(bool opened) {
if (drawerOpen == opened) return;
drawerOpen = opened;
notify();
}
void onDramaChanged(Drama drama) {
currentDrama = drama;
notify();