add window_manager plug in to get desktop active state to gate windows notifications; also add spam prevention to windows notifications #338

Merged
sarah merged 5 commits from winFocus into trunk 2022-01-26 21:41:37 +00:00
Owner
No description provided.
dan added 1 commit 2022-01-26 16:34:17 +00:00
dan added 1 commit 2022-01-26 16:34:26 +00:00
continuous-integration/drone/pr Build is failing Details
d96e251650
Merge branch 'trunk' into winFocus
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch-ui/519
sarah reviewed 2022-01-26 16:41:25 +00:00
@ -35,22 +38,43 @@ class LinuxNotificationsManager implements NotificationsManager {
// windows notifications
class WindowsNotificationManager implements NotificationsManager {
late ToastService service;
bool active = false;
Owner

why both focus and active?

why both focus and active?
Author
Owner

active is if a notification is active. it was firing a notification for every message, and they all need interacting with and dismisal on windows, it's not great. this rate limits it a bit, if the user hasnt yet interacted with one notification, don't fire more

active is if a notification is active. it was firing a notification for every message, and they all need interacting with and dismisal on windows, it's not great. this rate limits it a bit, if the user hasnt yet interacted with one notification, don't fire more
@ -45,0 +49,4 @@
service.stream.listen((event) {
if (event is ToastDismissed) {
print('Toast was dismissed.');
Owner

remove

remove
dan marked this conversation as resolved
@ -45,0 +53,4 @@
active = false;
}
if (event is ToastActivated) {
print('Toast was clicked.');
Owner

remove

remove
dan marked this conversation as resolved
@ -45,0 +57,4 @@
active = false;
}
if (event is ToastInteracted) {
print('${event.action} action in the toast was clicked.');
Owner

remove

remove
dan marked this conversation as resolved
@ -54,0 +67,4 @@
if (!globalAppState.focus) {
if (!active) {
Toast toast = new Toast(
type: ToastType.text02,
Owner

document comment that text02 is "contains subtitle"

document comment that `text02` is "contains subtitle"
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch-ui/518
dan added 1 commit 2022-01-26 16:42:36 +00:00
continuous-integration/drone/pr Build is failing Details
04cf1e16c2
pubspec for windows_manager
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/520
dan added 1 commit 2022-01-26 16:48:46 +00:00
continuous-integration/drone/pr Build is passing Details
dc587f95f0
remove prints, add comments
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/521
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/525
sarah added 1 commit 2022-01-26 21:41:31 +00:00
continuous-integration/drone/pr Build is pending Details
35ae5773f7
Merge branch 'trunk' into winFocus
sarah merged commit 2bff77983b into trunk 2022-01-26 21:41:37 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/cwtch-ui#338
No description provided.