Skip to content

Commit

Permalink
Fix bug when deleting notifications
Browse files Browse the repository at this point in the history
fixes #101
  • Loading branch information
maxisme committed May 17, 2021
1 parent 00b287a commit d2fa6b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/notifications/notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@ class NotificationUIState extends State<NotificationUI> {
]))));

if (Platform.isMacOS) {
final void Function({SlideActionType actionType}) openSlider =
Slidable.of(context).open;
final SlidableState slider = Slidable.of(context);
return LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
final double paddingArea = constraints.maxWidth - padding - 5;
Expand All @@ -343,8 +342,9 @@ class NotificationUIState extends State<NotificationUI> {
// time
Future<dynamic>.delayed(const Duration(milliseconds: 100), () {
if (mouseSliderAction != null &&
mouseSliderAction == actionType) {
openSlider(actionType: actionType);
mouseSliderAction == actionType &&
slider != null) {
slider.open(actionType: actionType);
}
});
},
Expand Down
2 changes: 1 addition & 1 deletion lib/notifications/notifis.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class Notifications extends ChangeNotifier {

return SlideTransition(
position: _offsetAnimation,
child: notifications[index],
child: notifications[index - 1],
);
}, duration: const Duration(milliseconds: 300));
}
Expand Down

0 comments on commit d2fa6b3

Please sign in to comment.