feat: 开屏后直接展示首页骨架

This commit is contained in:
Zhou Weidong committed 2026-10-22 23:11:03 +08:00
1 parent 56d7abc6b1
commit 5f278a3510
10 files changed
+300 -166

No files matched your search

+7 -5
View File
@@ -23,15 +23,17 @@ void main() {
test('should_make_first_catalog_entry_current_when_catalog_loads', () {
final logic = HomeLogic(dramas);
expect(logic.currentDrama.id, 'signal');
expect(logic.currentDrama?.id, 'signal');
expect(logic.tab, 0);
expect(logic.drawerOpen, isFalse);
expect(logic.videoImmersive, isFalse);
logic.dispose();
});
test('should_not_build_shell_when_catalog_is_empty', () {
expect(() => HomeLogic(const []), throwsStateError);
test('should_allow_empty_catalog_for_startup_skeleton', () {
final logic = HomeLogic(const []);
expect(logic.currentDrama, isNull);
logic.dispose();
});
test('should_not_raise_request_counter_when_only_tab_switches', () {
@@ -109,7 +111,7 @@ void main() {
final logic = HomeLogic(dramas);
logic.onDramaChanged(dramas[1]);
expect(logic.currentDrama.id, 'city');
expect(logic.currentDrama?.id, 'city');
logic.onImmersiveChanged(true);
expect(logic.videoImmersive, isTrue);
@@ -143,7 +145,7 @@ void main() {
expect(immediateNotifications, 0);
expect(tester.takeException(), isNull);
expect(logic.currentDrama.id, 'city');
expect(logic.currentDrama?.id, 'city');
await tester.pump();
expect(notifications, 1);
expect(tester.takeException(), isNull);