Skip to content

21 notifications#23

Open
lisaaerioh wants to merge 7 commits intomasterfrom
21-notifications
Open

21 notifications#23
lisaaerioh wants to merge 7 commits intomasterfrom
21-notifications

Conversation

@lisaaerioh
Copy link
Collaborator

No description provided.

@lisaaerioh lisaaerioh linked an issue May 3, 2022 that may be closed by this pull request
@lisaaerioh lisaaerioh requested a review from jakeane May 3, 2022 00:53
Copy link
Owner

@jakeane jakeane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks promising. What is your plan for incorporating prompts into the current functionality?

lib/main.dart Outdated
Comment on lines 110 to 134
notificationSchedule = NotificationCalendar(
timeZone: localTimeZone,
// hour: 16,
// minute: 59,
second: 0,
allowWhileIdle: true,
);

await notifications.createNotification(
content: NotificationContent(
groupKey: 'therabot_prompt_group',
channelKey: 'TherabotNotifications',
id: id,
title: 'Test notif',
body: "New text + $count"),
actionButtons: [
NotificationActionButton(
buttonType: ActionButtonType.Default,
label: 'Test',
key: 'test_button',
enabled: true,
)
],
schedule: notificationSchedule,
);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this sends a test notification at the next minute, am I understanding this right?

lib/main.dart Outdated
Comment on lines 23 to 30
Future<void> _initializeNotifications(
AwesomeNotifications notifications) async {
await notifications.initialize(
null,
[
NotificationChannel(
channelGroupKey: 'therabot_prompt_group',
groupAlertBehavior: GroupAlertBehavior.All,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is test code and still in development, but I feel like it is worth refactoring this into a notifications directory.

Comment on lines 4 to 9
String? _notificationBody;
String? getNotificationBody() => _notificationBody;
void setBody(String body) {
_notificationBody = body;
notifyListeners();
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this get used in any way right now? Or do you have a plan for this?

lisaaerioh added 2 commits May 5, 2022 06:37
…ication if the user has interacted with the chatbot in the last x amount of time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notifications

2 participants