From 0874ffa98e718e72c01eb0636fb6604333661084 Mon Sep 17 00:00:00 2001 From: juan Date: Mon, 11 Aug 2025 18:01:40 -0400 Subject: [PATCH] seen repaint fixed --- lib/email.dart | 4 ++++ lib/structs.dart | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/email.dart b/lib/email.dart index 7bf36a6..296f61b 100644 --- a/lib/email.dart +++ b/lib/email.dart @@ -106,6 +106,10 @@ class _EmailListScreenState extends State { icon: Icon(Icons.mark_email_read_outlined), onPressed: () { //mark email as read + setState(() { + widget.emails[index].seen = true; + ApiService().markAsSeen(email.id); + }); }, ), IconButton( diff --git a/lib/structs.dart b/lib/structs.dart index aee3358..4b0a9ba 100644 --- a/lib/structs.dart +++ b/lib/structs.dart @@ -11,7 +11,7 @@ class GetThreadResponse { final String from_name; final String from_address; final List to; - final bool seen; + late bool seen; GetThreadResponse({ required this.id,