seen repaint fixed

This commit is contained in:
Juan Marulanda De Los Rios 2025-08-11 18:01:40 -04:00
parent b8987e6a8d
commit 0874ffa98e
2 changed files with 5 additions and 1 deletions

View File

@ -106,6 +106,10 @@ class _EmailListScreenState extends State<EmailListScreen> {
icon: Icon(Icons.mark_email_read_outlined), icon: Icon(Icons.mark_email_read_outlined),
onPressed: () { onPressed: () {
//mark email as read //mark email as read
setState(() {
widget.emails[index].seen = true;
ApiService().markAsSeen(email.id);
});
}, },
), ),
IconButton( IconButton(

View File

@ -11,7 +11,7 @@ class GetThreadResponse {
final String from_name; final String from_name;
final String from_address; final String from_address;
final List<MailAddress> to; final List<MailAddress> to;
final bool seen; late bool seen;
GetThreadResponse({ GetThreadResponse({
required this.id, required this.id,