Add a button to mark all comics as read.

This commit is contained in:
2025-02-19 22:51:02 +08:00
parent a630771f0b
commit 2b3c7a8564
2 changed files with 28 additions and 4 deletions

View File

@@ -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?" : "您要全部標記為已讀嗎?"
}
}

View File

@@ -142,8 +142,7 @@ class _FollowUpdatesPageState extends AutomaticGlobalState<FollowUpdatesPage> {
}
}
return 0;
}
catch(_) {
} catch (_) {
return 0;
}
});
@@ -282,6 +281,27 @@ class _FollowUpdatesPageState extends AutomaticGlobalState<FollowUpdatesPage> {
"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();
},
);
},
),
],
),
),