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

@@ -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();
},
);
},
),
],
),
),