From 5fb0d2327d979ae0695e0f4f90d2c292ab0b0095 Mon Sep 17 00:00:00 2001 From: nyne Date: Tue, 18 Feb 2025 19:39:15 +0800 Subject: [PATCH] Improve history display. Part of #200 --- assets/translation.json | 8 ++++---- lib/pages/comic_details_page/comic_page.dart | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/assets/translation.json b/assets/translation.json index 44f5018..6cbaeaf 100644 --- a/assets/translation.json +++ b/assets/translation.json @@ -336,7 +336,6 @@ "Number of images preloaded": "预加载图片数量", "Ascending": "升序", "Descending": "降序", - "Last Reading: Chapter @ep Page @page": "上次阅读: 第 @ep 章 第 @page 页", "Last Reading: Page @page": "上次阅读: 第 @page 页", "Replies": "回复", "Follow Updates": "追更", @@ -357,7 +356,8 @@ "Once the operation is successful, app will automatically sync data with the server.": "操作成功后, APP将自动与服务器同步数据", "Webdav is enabled." : "已启用Webdav", "Cache cleared": "缓存已清除", - "Disabled": "已禁用" + "Disabled": "已禁用", + "Last Reading: @epName Page @page": "上次阅读: @epName 第 @page 页" }, "zh_TW": { "Home": "首頁", @@ -696,7 +696,6 @@ "Number of images preloaded": "預加載圖片數量", "Ascending": "升序", "Descending": "降序", - "Last Reading: Chapter @ep Page @page": "上次閱讀: 第 @ep 章 第 @page 頁", "Last Reading: Page @page": "上次閱讀: 第 @page 頁", "Replies": "回覆", "Follow Updates": "追更", @@ -717,6 +716,7 @@ "Once the operation is successful, app will automatically sync data with the server.": "操作成功後, APP將自動與服務器同步數據", "Webdav is enabled." : "已啟用Webdav", "Cache cleared": "緩存已清除", - "Disabled": "已禁用" + "Disabled": "已禁用", + "Last Reading: @epName Page @page": "上次閱讀: @epName 第 @page 頁" } } \ No newline at end of file diff --git a/lib/pages/comic_details_page/comic_page.dart b/lib/pages/comic_details_page/comic_page.dart index f0b34a9..609246c 100644 --- a/lib/pages/comic_details_page/comic_page.dart +++ b/lib/pages/comic_details_page/comic_page.dart @@ -385,8 +385,9 @@ class _ComicPageState extends LoadingState var ep = history!.ep; String text; if (haveChapter) { - text = "Last Reading: Chapter @ep Page @page".tlParams({ - 'ep': ep, + text = "Last Reading: @epName Page @page".tlParams({ + 'epName': comic.chapters!.values.elementAt( + math.min(ep - 1, comic.chapters!.length - 1)), 'page': page, }); } else {