seen repaint fixed
This commit is contained in:
		
							parent
							
								
									b8987e6a8d
								
							
						
					
					
						commit
						0874ffa98e
					
				
					 2 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -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(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue