Stub Notifications for Group Messages Linux #6

Merged
dan merged 4 commits from notifications into trunk 2021-06-25 17:05:12 +00:00
2 changed files with 2 additions and 1 deletions
Showing only changes of commit c9c580c9da - Show all commits

View File

@ -131,6 +131,7 @@ class CwtchNotifier {
}
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"])!.totalMessages++;
profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(data["GroupID"], DateTime.now());
notificationManager.notify("New Message From Group!");
} else {
// from me (already displayed - do not update counter)
var idx = data["Signature"];

View File

@ -20,6 +20,6 @@ class LinuxNotificationsManager implements NotificationsManager {
LinuxNotificationsManager() {}
Future<void> notify(String message) async {
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.notify(message, appName: "cwtch", appIcon: icon_path.toString(), replacesId: this.previous_id).then((Notification value) => previous_id = value.id);
}
}