windows notifications: switch from desktoats to win_toats #350

Merged
sarah merged 2 commits from wintoasts into trunk 2022-02-04 02:01:22 +00:00
Owner
No description provided.
dan added 1 commit 2022-02-02 20:39:53 +00:00
sarah reviewed 2022-02-02 20:43:41 +00:00
@ -31,3 +32,3 @@
Future<void> notify(String message) async {
var iconPath = Uri.file(path.join(path.current, "cwtch.png"));
client.notify(message, appName: "cwtch", appIcon: iconPath.toString(), replacesId: this.previous_id).then((Notification value) => previous_id = value.id);
client
Owner

why formatting?

why formatting?
Author
Owner

my bad, i think my androidstudio on windows hasnt had line length set to 200

my bad, i think my androidstudio on windows hasnt had line length set to 200
dan marked this conversation as resolved
@ -38,4 +44,3 @@
// windows notifications
class WindowsNotificationManager implements NotificationsManager {
late ToastService service;
bool active = false;
Owner

why use active and not just Toast? ?

why use active and not just `Toast?` ?
Author
Owner

hm. make toast? a class level obj? i can try that

hm. make toast? a class level obj? i can try that
Author
Owner

so

         toast = await WinToast.instance().showToast(type: ToastType.text01, title: message);

is async so not too fast. when tested with with fuzzbot/blns it meant i'd see up to 6 active notifications get through. compared to just setting a bool at the top of the block, which with blns test maintained a solid 1 notification

so ``` toast = await WinToast.instance().showToast(type: ToastType.text01, title: message); ``` is async so not too fast. when tested with with fuzzbot/blns it meant i'd see up to 6 active notifications get through. compared to just setting a bool at the top of the block, which with blns test maintained a solid 1 notification
dan marked this conversation as resolved
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/536
dan added 1 commit 2022-02-03 13:59:07 +00:00
continuous-integration/drone/pr Build is passing Details
19a202a04c
formating, and moving active=true up to be better
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch-ui/539
sarah merged commit cd4c778b71 into trunk 2022-02-04 02:01:22 +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#350
No description provided.