feat: new ui (#1455)

This commit is contained in:
Levi authored and GitHub committed 2026-09-05 19:53:41 +08:00
1 parent 3be8db664c
commit 177c225f16
742 files changed
+59951 -5934

No files matched your search

@@ -0,0 +1,20 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:gopeed/api/model/downloader_config.dart';
void main() {
test('auto-start tasks uses the backend-owned top-level config field', () {
final config = DownloaderConfig(autoStartTasks: true);
final json = config.toJson();
expect(json['autoStartTasks'], isTrue);
expect(json['extra'], isNot(contains('autoStartTasks')));
expect(DownloaderConfig.fromJson(json).autoStartTasks, isTrue);
});
test('legacy extra auto-start setting is not migrated', () {
final json = DownloaderConfig().toJson();
(json['extra'] as Map<String, dynamic>)['autoStartTasks'] = true;
expect(DownloaderConfig.fromJson(json).autoStartTasks, isFalse);
});
}