mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 12:14:11 +00:00 
			
		
		
		
	Delete notification when they are clicked
This commit is contained in:
		@@ -121,6 +121,8 @@ class _NotificationsScreenState extends State<NotificationsScreen> {
 | 
				
			|||||||
          child: Text(tr("You do not have any notification now.")),
 | 
					          child: Text(tr("You do not have any notification now.")),
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    throw Error();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// Delete a notification
 | 
					  /// Delete a notification
 | 
				
			||||||
@@ -272,8 +274,12 @@ class _NotificationTile extends StatelessWidget {
 | 
				
			|||||||
    } else if (notification.onElemType ==
 | 
					    } else if (notification.onElemType ==
 | 
				
			||||||
        n.NotificationElementType.FRIENDSHIP_REQUEST) {
 | 
					        n.NotificationElementType.FRIENDSHIP_REQUEST) {
 | 
				
			||||||
      openUserPage(userID: notification.fromUser, context: context);
 | 
					      openUserPage(userID: notification.fromUser, context: context);
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      showSimpleSnack(context,
 | 
				
			||||||
 | 
					          tr("This kind of notification is not supported yet by this application."));
 | 
				
			||||||
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // TODO : mark the notification as seen
 | 
					    onDelete(notification);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user