From 3c721fc87d9f1f77b0efd82f0f9277d344386288 Mon Sep 17 00:00:00 2001 From: niuhuan Date: Mon, 8 Jan 2024 15:41:36 +0800 Subject: [PATCH] :bug: page index of downloads --- ci/version.code.txt | 2 +- ci/version.info.txt | 14 ++++---------- lib/screens/comic_info_screen.dart | 2 +- native/src/downloading.rs | 8 ++++---- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/ci/version.code.txt b/ci/version.code.txt index e1d848b..6183501 100644 --- a/ci/version.code.txt +++ b/ci/version.code.txt @@ -1 +1 @@ -v0.0.8 \ No newline at end of file +v0.0.9 \ No newline at end of file diff --git a/ci/version.info.txt b/ci/version.info.txt index fd414b8..22ac44e 100644 --- a/ci/version.info.txt +++ b/ci/version.info.txt @@ -1,6 +1,10 @@ ## 如果图片显示不出来需要删除原来的APP重新安装 ## PC端需要手动找到文件夹删除 +v0.0.9 + +- [x] 修复下载之后顺序错乱(需要重新下载) + v0.0.8 - [x] 更换线路 @@ -9,13 +13,3 @@ v0.0.7 - [x] 修复收藏夹 -v0.0.6 - -- [x] 修复下一章按钮错误 -- [x] 修复标题和按钮重叠 - - -v0.0.5 - -- [x] 登录以后可以收藏漫画 -- [x] 收藏漫画的列表 diff --git a/lib/screens/comic_info_screen.dart b/lib/screens/comic_info_screen.dart index 7bb8fd3..7b90e44 100644 --- a/lib/screens/comic_info_screen.dart +++ b/lib/screens/comic_info_screen.dart @@ -437,7 +437,7 @@ class _ComicInfoScreenState extends State with RouteAware { elevation: 0, color: Colors.grey.shade500.withOpacity(.3), textColor: Theme.of(context).textTheme.bodyMedium?.color, - child: const Text("从头开始"), + child: const Text("从orde头开始"), onPressed: _startRead, ), ), diff --git a/native/src/downloading.rs b/native/src/downloading.rs index b03d322..e163cd7 100644 --- a/native/src/downloading.rs +++ b/native/src/downloading.rs @@ -183,13 +183,13 @@ async fn fetch_chapter(chapter: &download_comic_chapter::Model) -> anyhow::Resul { Ok(data) => { let mut urls = Vec::with_capacity(data.chapter.contents.len()); - for _ in 0..data.chapter.contents.len() { + for _ in 0..data.chapter.words.len() { urls.push("".to_owned()); } - for i in 0..data.chapter.contents.len() { + for i in 0..data.chapter.words.len() { let idx = *data.chapter.words.get(i).with_context(|| "words")? as usize; - let url = data.chapter.contents.get(idx).with_context(|| "contents")?; - urls[i] = url.url.clone(); + let url = data.chapter.contents.get(i).with_context(|| "contents")?; + urls[idx] = url.url.clone(); } let mut idx = 0; let mut images = vec![];