Skip to content

Conversation

ericli3690
Copy link
Member

Purpose / Description

As discussed on Discord, once the upcoming multiprofile system is implemented, we will need to fire review reminder notifications for all profiles, not just the active one. Currently however, once a notification is scheduled by AlarmManagerService and passed to the OS, there is no indication of which profile it is attached to as ReviewReminder does not include profile information. This is a problem because once the notification fires, it will need to open the corresponding collection to check if there are cards due. Without storing some sort of profile ID in ReviewReminder, the notification code will need to open each profile's collection one after the other to find the deck it is looking for.

This small change rectifies this issue by adding a profileID string field to ReviewReminder. The field is a string because most discussion around the profile ID in Discord and in candidate GSoC proposals revolves around using either a UUID or a string name. In the case of a UUID, we cannot use the built-in Java UUID type because it is not Serializable. Hence, it will need to be converted to a string before it is stored in ReviewReminder. In both cases, a string is sufficient.

See #19065 and Discord (#multiprofile) for more context.

Fixes

  • GSoC 2025: Review Reminders

How Has This Been Tested?

  • Runs with the AddEdit code fine on a physical Samsung S23, API 34.

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code

GSoC 2025: Review Reminders

As discussed on Discord, once the upcoming multiprofile system is implemented, we will need to fire review reminder notifications for all profiles, not just the active one. Currently however, once a notification is scheduled by AlarmManagerService and passed to the OS, there is no indication of which profile it is attached to as ReviewReminder does not include profile information. This is a problem because once the notification fires, it will need to open the corresponding collection to check if there are cards due. Without storing some sort of profile ID in ReviewReminder, the notification code will need to open each profile's collection one after the other to find the deck it is looking for.

This small change rectifies this issue by adding a profileID string field to ReviewReminder. The field is a string because most discussion around the profile ID in Discord and in candidate GSoC proposals revolves around using either a UUID or a string name. In the case of a UUID, we cannot use the built-in Java UUID type because it is not Serializable. Hence, it will need to be converted to a string before it is stored in ReviewReminder. In both cases, a string is sufficient.
@ericli3690 ericli3690 added Needs Review GSoC Pull requests authored by a Google Summer of Code participant [Candidate/Selected], for GSoC mentors labels Sep 15, 2025
Copy link
Contributor

@criticalAY criticalAY left a comment

Choose a reason for hiding this comment

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

Looks good! thanks

@criticalAY criticalAY added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Sep 16, 2025
@Arthur-Milchior Arthur-Milchior added this pull request to the merge queue Sep 28, 2025
Merged via the queue into ankidroid:main with commit 9bc5144 Sep 28, 2025
13 checks passed
@github-actions github-actions bot added this to the 2.23 release milestone Sep 28, 2025
@github-actions github-actions bot removed the Needs Second Approval Has one approval, one more approval to merge label Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoC Pull requests authored by a Google Summer of Code participant [Candidate/Selected], for GSoC mentors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants