diff --git a/lib/widgets/homepage_post.dart b/lib/widgets/homepage_post.dart index 92eb4c4..4b798a1 100644 --- a/lib/widgets/homepage_post.dart +++ b/lib/widgets/homepage_post.dart @@ -32,11 +32,18 @@ class _HomepagePostState extends State { : Theme.of(context).colorScheme.secondaryContainer.withAlpha(150), ), child: InkWell( - onTap: () { + onTap: () async { Navigator.of(context).push( MaterialPageRoute( builder: (context) => ArticlePage(article: post)), ); + if (!post.isRead) { + await post.api + .request() + .markItem(post, ItemMarkType.read) + .execute(); + setState(() {}); + } }, onLongPress: () async { var theme = Theme.of(context);