Skip to content

Commit

Permalink
mark as read on LongPress
Browse files Browse the repository at this point in the history
resolves #107
  • Loading branch information
maxisme committed May 22, 2021
1 parent 3397a6e commit 78a7f94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Future<void> main() async {
final SharedPreferences sp = await SharedPreferences.getInstance();
await invokeMacMethod(
'set-pin-window', <String, bool>{'transient': !shouldPinWindow(sp)});
invokeMacMethod(
await invokeMacMethod(
'set-sparkle-url', <String, String>{'url': versionEndpoint});
}

Expand Down
9 changes: 8 additions & 1 deletion lib/notifications/notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,14 @@ class NotificationUIState extends State<NotificationUI> {
child: slideNotification);
});
}
return slideNotification;
return GestureDetector(
onLongPress: () {
setState(() {
Provider.of<Notifications>(context, listen: false)
.toggleRead(widget.index);
});
},
child: slideNotification);
});
}

Expand Down

0 comments on commit 78a7f94

Please sign in to comment.