mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +00:00 
			
		
		
		
	Improve notifications delete button
This commit is contained in:
		@@ -26,6 +26,14 @@ enum _Status { LOADING, ERROR, NONE }
 | 
				
			|||||||
enum _PopupMenuActions { DELETE }
 | 
					enum _PopupMenuActions { DELETE }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class NotificationsScreen extends StatefulWidget {
 | 
					class NotificationsScreen extends StatefulWidget {
 | 
				
			||||||
 | 
					  final bool useSmallDeleteButton;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const NotificationsScreen({
 | 
				
			||||||
 | 
					    Key key,
 | 
				
			||||||
 | 
					    this.useSmallDeleteButton = false,
 | 
				
			||||||
 | 
					  })  : assert(useSmallDeleteButton != null),
 | 
				
			||||||
 | 
					        super(key: key);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  _NotificationsScreenState createState() => _NotificationsScreenState();
 | 
					  _NotificationsScreenState createState() => _NotificationsScreenState();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -100,13 +108,14 @@ class _NotificationsScreenState extends SafeState<NotificationsScreen> {
 | 
				
			|||||||
        ),
 | 
					        ),
 | 
				
			||||||
        // Add conversation button
 | 
					        // Add conversation button
 | 
				
			||||||
        Positioned(
 | 
					        Positioned(
 | 
				
			||||||
          right: 20.0,
 | 
					          right: widget.useSmallDeleteButton ? 0.0 : 20.0,
 | 
				
			||||||
          bottom: 20.0,
 | 
					          bottom: widget.useSmallDeleteButton ? 0.0 : 20.0,
 | 
				
			||||||
          child: FloatingActionButton(
 | 
					          child: FloatingActionButton(
 | 
				
			||||||
 | 
					            mini: widget.useSmallDeleteButton,
 | 
				
			||||||
            onPressed: () => _deleteAllNotifications(),
 | 
					            onPressed: () => _deleteAllNotifications(),
 | 
				
			||||||
            child: Icon(Icons.delete),
 | 
					            child: Icon(Icons.delete),
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
        ),
 | 
					        )
 | 
				
			||||||
      ]),
 | 
					      ]),
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -64,7 +64,7 @@ class _ComunicTabletAppBarWidgetState
 | 
				
			|||||||
          notificationsBadge: _unreadNotifications.notifications,
 | 
					          notificationsBadge: _unreadNotifications.notifications,
 | 
				
			||||||
          onBuildOverlay: (c) => Padding(
 | 
					          onBuildOverlay: (c) => Padding(
 | 
				
			||||||
            padding: const EdgeInsets.all(8.0),
 | 
					            padding: const EdgeInsets.all(8.0),
 | 
				
			||||||
            child: NotificationsScreen(),
 | 
					            child: NotificationsScreen(useSmallDeleteButton: true),
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
        AppBarCustomDropDownWidget(
 | 
					        AppBarCustomDropDownWidget(
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user