XPEHO / YAKI

Working localization declaration app
BSD 3-Clause "New" or "Revised" License
13 stars 1 forks source link

Fix / Notification - Flutter part - Prevent notification if user is already declared or has set absence #1438

Closed NyraSama closed 2 months ago

NyraSama commented 4 months ago

🗒️NOTES

Currently we receive a notification everyday at 9 o clock. But if we do our declaration at 8 o clock we want to not have any notification.

🏁PREREQUISITES

📜CONTEXT (User Story)

As a user

I want to receive a daily notification only if i am not already declared

In order to not forget to declare me

🪳STEPS TO REPRODUCE

🪜STEPS FOR A FIX

Kotlin Channel

Swift channel

✅ACCEPTANCE CRITERIA

📛BLOCKERS

🟢 Waiting for #1507

🔍AFFECTED COMPONENT(S) (Scope)

⛓️LINK TO OTHER ISSUES

🪟SCREEN SHOTS & MOCKUPS

LaurentMag commented 3 months ago

IOS : you need to change the createNotification() from NotificationManager.swift so prevent the notification for current day only. if you prevent "scheduleNotificationIfAuthorized()" when user is already declared for the current day, you will prevent the notification schedule for the entier week.

As reminder : IOS notification are schedule when terminating / closing the app, therefore all notification are schedule at once (unlike android waking up app to create the notification on a daily basis)