diff --git a/assets/translation.json b/assets/translation.json index 8aad7cd..e24350b 100644 --- a/assets/translation.json +++ b/assets/translation.json @@ -358,7 +358,9 @@ "Cache cleared": "缓存已清除", "Disabled": "已禁用", "Last Reading: @epName Page @page": "上次阅读: @epName 第 @page 页", - "WebDAV Auto Sync": "WebDAV 自动同步" + "WebDAV Auto Sync": "WebDAV 自动同步", + "Mark all as read": "全部标记为已读", + "Do you want to mark all as read?" : "您要全部标记为已读吗?" }, "zh_TW": { "Home": "首頁", @@ -719,6 +721,8 @@ "Cache cleared": "緩存已清除", "Disabled": "已禁用", "Last Reading: @epName Page @page": "上次閱讀: @epName 第 @page 頁", - "WebDAV Auto Sync": "WebDAV 自動同步" + "WebDAV Auto Sync": "WebDAV 自動同步", + "Mark all as read": "全部標記為已讀", + "Do you want to mark all as read?" : "您要全部標記為已讀嗎?" } } \ No newline at end of file diff --git a/lib/pages/follow_updates_page.dart b/lib/pages/follow_updates_page.dart index 67fec8f..cf3dfa9 100644 --- a/lib/pages/follow_updates_page.dart +++ b/lib/pages/follow_updates_page.dart @@ -142,8 +142,7 @@ class _FollowUpdatesPageState extends AutomaticGlobalState { } } return 0; - } - catch(_) { + } catch (_) { return 0; } }); @@ -282,6 +281,27 @@ class _FollowUpdatesPageState extends AutomaticGlobalState { "Updates".tl, style: ts.s18, ), + const Spacer(), + if (updatedComics.isNotEmpty) + IconButton( + icon: Icon(Icons.clear_all), + onPressed: () { + showConfirmDialog( + context: App.rootContext, + title: "Mark all as read".tl, + content: "Do you want to mark all as read?".tl, + onConfirm: () { + for (var comic in updatedComics) { + LocalFavoritesManager().markAsRead( + comic.id, + comic.type, + ); + } + updateFollowUpdatesUI(); + }, + ); + }, + ), ], ), ),