parent
ce6cc4c8b7
commit
e98ca88359
|
@ -16,11 +16,10 @@ class NullNotificationsManager implements NotificationsManager {
|
|||
// the standard dbus-powered linux desktop notifications.
|
||||
class LinuxNotificationsManager implements NotificationsManager {
|
||||
int previous_id = 0;
|
||||
final NotificationsClient client = NotificationsClient();
|
||||
LinuxNotificationsManager() {}
|
||||
Future<void> notify(String message) async {
|
||||
var client = NotificationsClient();
|
||||
var icon_path = Uri.file(path.join(path.current, "cwtch.png"));
|
||||
client.notify('New Message from Peer!', appName: "cwtch", appIcon: icon_path.toString(), replacesId: this.previous_id).then((Notification value) => previous_id = value.id);
|
||||
client.close();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue