fix
This commit is contained in:
parent
4f68505a9b
commit
d4f99946a3
5 changed files with 18 additions and 12 deletions
|
|
@ -21,7 +21,7 @@ class Chapter {
|
|||
|
||||
String? lastPageRead;
|
||||
|
||||
///Only for local archive BD
|
||||
///Only for local archive Comic
|
||||
String? archivePath;
|
||||
|
||||
final manga = IsarLink<Manga>();
|
||||
|
|
|
|||
|
|
@ -122,12 +122,12 @@ class _HistoryScreenState extends ConsumerState<HistoryScreen> {
|
|||
if (entries.isNotEmpty) {
|
||||
return GroupedListView<History, String>(
|
||||
elements: entries,
|
||||
groupBy: (element) => dateFormat(element.date!, ref: ref),
|
||||
groupBy: (element) => element.date!,
|
||||
groupSeparatorBuilder: (String groupByValue) => Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8, left: 12),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(groupByValue),
|
||||
Text(dateFormat(groupByValue, ref: ref)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -42,13 +42,15 @@ Future importArchivesFromDirectory(ImportArchivesFromDirectoryRef ref) async {
|
|||
}
|
||||
|
||||
@riverpod
|
||||
Future importArchivesFromFile(ImportArchivesFromFileRef ref,
|
||||
Manga? mManga) async {
|
||||
FilePickerResult? result = await FilePicker.platform
|
||||
.pickFiles(type: FileType.custom, allowedExtensions: [
|
||||
'cbz',
|
||||
'zip',
|
||||
]);
|
||||
Future importArchivesFromFile(
|
||||
ImportArchivesFromFileRef ref, Manga? mManga) async {
|
||||
FilePickerResult? result = await FilePicker.platform.pickFiles(
|
||||
allowMultiple: true,
|
||||
type: FileType.custom,
|
||||
allowedExtensions: [
|
||||
'cbz',
|
||||
'zip',
|
||||
]);
|
||||
if (result != null) {
|
||||
for (var file in result.files) {
|
||||
final data =
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class ChapterIntervalPageView extends ConsumerWidget {
|
|||
),
|
||||
if (noMoreChapter)
|
||||
Text(
|
||||
"There is no $noMore chapter",
|
||||
"There's no $noMore chapter",
|
||||
style: const TextStyle(color: Colors.white, fontSize: 14),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -463,7 +463,11 @@ class _MangaChapterPageGalleryState
|
|||
|
||||
late bool _showPagesNumber = _readerController.getShowPageNumber();
|
||||
_setReaderMode(ReaderMode value, bool isInit) async {
|
||||
final indexPos = isInit ? _posIndex ?? _currentIndex : _posIndex;
|
||||
final indexPos = _posIndex == null
|
||||
? _currentIndex
|
||||
: isInit
|
||||
? _currentIndex
|
||||
: _posIndex;
|
||||
_readerController.setReaderMode(value);
|
||||
if (value == ReaderMode.vertical) {
|
||||
if (mounted) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue