From 094f8d5075b44cc9e2fa09e5253e80750688fb2a Mon Sep 17 00:00:00 2001 From: nesquikm Date: Wed, 25 Oct 2023 10:22:22 +0400 Subject: [PATCH] refactor: add TomeLibrary --- lib/features/library/library.dart | 2 +- lib/features/library/tome_library/tome_library.dart | 0 .../tome_list/cached_tome/cached_tome.dart | 2 +- .../tome_list/cached_tome/tome/epub_tome.dart | 2 +- .../tome_list/cached_tome/tome/fb2_tome.dart | 2 +- .../{ => tome_library}/tome_list/cached_tome/tome/tome.dart | 6 +++--- .../tome_list/cached_tome/tome/tome_info.dart | 0 .../tome_list/cached_tome/tome/tome_info.freezed.dart | 0 .../tome_list/cached_tome/tome/tome_info.g.dart | 0 .../library/{ => tome_library}/tome_list/exceptions.dart | 0 .../library/{ => tome_library}/tome_list/tome_list.dart | 6 +++--- .../library/{ => tome_library}/tome_list/tome_list.g.dart | 0 test/library/cached_tome_test.dart | 2 +- test/library/epub_tome_test.dart | 2 +- test/library/fb2_tome_test.dart | 2 +- test/library/tome_list_test.dart | 3 +-- test/library/tome_test.dart | 6 +++--- 17 files changed, 17 insertions(+), 18 deletions(-) create mode 100644 lib/features/library/tome_library/tome_library.dart rename lib/features/library/{ => tome_library}/tome_list/cached_tome/cached_tome.dart (96%) rename lib/features/library/{ => tome_library}/tome_list/cached_tome/tome/epub_tome.dart (92%) rename lib/features/library/{ => tome_library}/tome_list/cached_tome/tome/fb2_tome.dart (96%) rename lib/features/library/{ => tome_library}/tome_list/cached_tome/tome/tome.dart (86%) rename lib/features/library/{ => tome_library}/tome_list/cached_tome/tome/tome_info.dart (100%) rename lib/features/library/{ => tome_library}/tome_list/cached_tome/tome/tome_info.freezed.dart (100%) rename lib/features/library/{ => tome_library}/tome_list/cached_tome/tome/tome_info.g.dart (100%) rename lib/features/library/{ => tome_library}/tome_list/exceptions.dart (100%) rename lib/features/library/{ => tome_library}/tome_list/tome_list.dart (93%) rename lib/features/library/{ => tome_library}/tome_list/tome_list.g.dart (100%) diff --git a/lib/features/library/library.dart b/lib/features/library/library.dart index 8505875..0ac735e 100644 --- a/lib/features/library/library.dart +++ b/lib/features/library/library.dart @@ -1,2 +1,2 @@ export 'page/page.dart'; -export 'tome_list/tome_list.dart'; +export 'tome_library/tome_library.dart'; diff --git a/lib/features/library/tome_library/tome_library.dart b/lib/features/library/tome_library/tome_library.dart new file mode 100644 index 0000000..e69de29 diff --git a/lib/features/library/tome_list/cached_tome/cached_tome.dart b/lib/features/library/tome_library/tome_list/cached_tome/cached_tome.dart similarity index 96% rename from lib/features/library/tome_list/cached_tome/cached_tome.dart rename to lib/features/library/tome_library/tome_list/cached_tome/cached_tome.dart index 554cf9f..1fe7640 100644 --- a/lib/features/library/tome_list/cached_tome/cached_tome.dart +++ b/lib/features/library/tome_library/tome_list/cached_tome/cached_tome.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'dart:io'; -import 'package:bsr/features/library/tome_list/cached_tome/tome/tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/tome.dart'; import 'package:image/image.dart'; import 'package:path/path.dart'; diff --git a/lib/features/library/tome_list/cached_tome/tome/epub_tome.dart b/lib/features/library/tome_library/tome_list/cached_tome/tome/epub_tome.dart similarity index 92% rename from lib/features/library/tome_list/cached_tome/tome/epub_tome.dart rename to lib/features/library/tome_library/tome_list/cached_tome/tome/epub_tome.dart index d671a53..c26eb97 100644 --- a/lib/features/library/tome_list/cached_tome/tome/epub_tome.dart +++ b/lib/features/library/tome_library/tome_list/cached_tome/tome/epub_tome.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:bsr/features/library/tome_list/cached_tome/tome/tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/tome.dart'; import 'package:epubx/epubx.dart'; class EpubTome extends Tome { diff --git a/lib/features/library/tome_list/cached_tome/tome/fb2_tome.dart b/lib/features/library/tome_library/tome_list/cached_tome/tome/fb2_tome.dart similarity index 96% rename from lib/features/library/tome_list/cached_tome/tome/fb2_tome.dart rename to lib/features/library/tome_library/tome_list/cached_tome/tome/fb2_tome.dart index 79ab1e2..665106f 100644 --- a/lib/features/library/tome_list/cached_tome/tome/fb2_tome.dart +++ b/lib/features/library/tome_library/tome_list/cached_tome/tome/fb2_tome.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'package:archive/archive_io.dart'; -import 'package:bsr/features/library/tome_list/cached_tome/tome/tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/tome.dart'; import 'package:crypto/crypto.dart'; import 'package:fb2_parse/fb2_parse.dart'; import 'package:image/image.dart'; diff --git a/lib/features/library/tome_list/cached_tome/tome/tome.dart b/lib/features/library/tome_library/tome_list/cached_tome/tome/tome.dart similarity index 86% rename from lib/features/library/tome_list/cached_tome/tome/tome.dart rename to lib/features/library/tome_library/tome_list/cached_tome/tome/tome.dart index 757d136..04c75f9 100644 --- a/lib/features/library/tome_list/cached_tome/tome/tome.dart +++ b/lib/features/library/tome_library/tome_list/cached_tome/tome/tome.dart @@ -2,9 +2,9 @@ import 'dart:io'; import 'dart:typed_data'; import 'package:async/async.dart'; -import 'package:bsr/features/library/tome_list/cached_tome/tome/epub_tome.dart'; -import 'package:bsr/features/library/tome_list/cached_tome/tome/fb2_tome.dart'; -import 'package:bsr/features/library/tome_list/cached_tome/tome/tome_info.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/epub_tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/fb2_tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/tome_info.dart'; import 'package:convert/convert.dart'; import 'package:crypto/crypto.dart'; import 'package:image/image.dart'; diff --git a/lib/features/library/tome_list/cached_tome/tome/tome_info.dart b/lib/features/library/tome_library/tome_list/cached_tome/tome/tome_info.dart similarity index 100% rename from lib/features/library/tome_list/cached_tome/tome/tome_info.dart rename to lib/features/library/tome_library/tome_list/cached_tome/tome/tome_info.dart diff --git a/lib/features/library/tome_list/cached_tome/tome/tome_info.freezed.dart b/lib/features/library/tome_library/tome_list/cached_tome/tome/tome_info.freezed.dart similarity index 100% rename from lib/features/library/tome_list/cached_tome/tome/tome_info.freezed.dart rename to lib/features/library/tome_library/tome_list/cached_tome/tome/tome_info.freezed.dart diff --git a/lib/features/library/tome_list/cached_tome/tome/tome_info.g.dart b/lib/features/library/tome_library/tome_list/cached_tome/tome/tome_info.g.dart similarity index 100% rename from lib/features/library/tome_list/cached_tome/tome/tome_info.g.dart rename to lib/features/library/tome_library/tome_list/cached_tome/tome/tome_info.g.dart diff --git a/lib/features/library/tome_list/exceptions.dart b/lib/features/library/tome_library/tome_list/exceptions.dart similarity index 100% rename from lib/features/library/tome_list/exceptions.dart rename to lib/features/library/tome_library/tome_list/exceptions.dart diff --git a/lib/features/library/tome_list/tome_list.dart b/lib/features/library/tome_library/tome_list/tome_list.dart similarity index 93% rename from lib/features/library/tome_list/tome_list.dart rename to lib/features/library/tome_library/tome_list/tome_list.dart index adc0464..d9d73b7 100644 --- a/lib/features/library/tome_list/tome_list.dart +++ b/lib/features/library/tome_library/tome_list/tome_list.dart @@ -1,14 +1,14 @@ import 'dart:async'; import 'dart:io'; -import 'package:bsr/features/library/tome_list/cached_tome/cached_tome.dart'; -import 'package:bsr/features/library/tome_list/exceptions.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/cached_tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/exceptions.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; +export 'cached_tome/cached_tome.dart'; export 'exceptions.dart'; -export 'tome_list.dart'; part 'tome_list.g.dart'; diff --git a/lib/features/library/tome_list/tome_list.g.dart b/lib/features/library/tome_library/tome_list/tome_list.g.dart similarity index 100% rename from lib/features/library/tome_list/tome_list.g.dart rename to lib/features/library/tome_library/tome_list/tome_list.g.dart diff --git a/test/library/cached_tome_test.dart b/test/library/cached_tome_test.dart index bd44193..0bd0cb6 100644 --- a/test/library/cached_tome_test.dart +++ b/test/library/cached_tome_test.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:bsr/features/library/tome_list/cached_tome/cached_tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/cached_tome.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:image/image.dart'; import 'package:path/path.dart'; diff --git a/test/library/epub_tome_test.dart b/test/library/epub_tome_test.dart index 15b38a7..30ef978 100644 --- a/test/library/epub_tome_test.dart +++ b/test/library/epub_tome_test.dart @@ -1,4 +1,4 @@ -import 'package:bsr/features/library/tome_list/cached_tome/tome/epub_tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/epub_tome.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/test/library/fb2_tome_test.dart b/test/library/fb2_tome_test.dart index bbf0e6f..69534f5 100644 --- a/test/library/fb2_tome_test.dart +++ b/test/library/fb2_tome_test.dart @@ -1,4 +1,4 @@ -import 'package:bsr/features/library/tome_list/cached_tome/tome/fb2_tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/fb2_tome.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/test/library/tome_list_test.dart b/test/library/tome_list_test.dart index 74e780d..fcf556c 100644 --- a/test/library/tome_list_test.dart +++ b/test/library/tome_list_test.dart @@ -1,7 +1,6 @@ import 'dart:io'; -import 'package:bsr/features/library/library.dart'; -import 'package:bsr/features/library/tome_list/cached_tome/cached_tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/tome_list.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:path/path.dart'; import 'package:riverpod/riverpod.dart'; diff --git a/test/library/tome_test.dart b/test/library/tome_test.dart index 19ad3ac..ba27f96 100644 --- a/test/library/tome_test.dart +++ b/test/library/tome_test.dart @@ -1,6 +1,6 @@ -import 'package:bsr/features/library/tome_list/cached_tome/tome/epub_tome.dart'; -import 'package:bsr/features/library/tome_list/cached_tome/tome/fb2_tome.dart'; -import 'package:bsr/features/library/tome_list/cached_tome/tome/tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/epub_tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/fb2_tome.dart'; +import 'package:bsr/features/library/tome_library/tome_list/cached_tome/tome/tome.dart'; import 'package:flutter_test/flutter_test.dart'; void main() {