Skip to content

feat: Adapt reminder to backend changes - #3015

Open
Elouan1411 wants to merge 12 commits into
unit-testsfrom
adapt-with-new-backend
Open

feat: Adapt reminder to backend changes#3015
Elouan1411 wants to merge 12 commits into
unit-testsfrom
adapt-with-new-backend

Conversation

@Elouan1411

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI balanced review requested due to automatic review settings August 5, 2026 11:05
@Elouan1411
Elouan1411 changed the base branch from main to unit-tests August 5, 2026 11:05
@Elouan1411
Elouan1411 marked this pull request as draft August 5, 2026 11:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adapts reminder-message handling to new backend status fields.

Changes:

  • Adds reminder visibility fields to Message.
  • Requests reminder status when fetching a message.
  • Filters hidden reminders during thread recomputation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
Message.kt Models backend reminder visibility fields.
ThreadRecomputations.kt Filters reminder messages from displayed content.
ApiRepository.kt Requests per-message reminder status.

Comment thread app/src/main/java/com/infomaniak/mail/data/api/ApiRepository.kt Outdated
@Elouan1411
Elouan1411 force-pushed the adapt-with-new-backend branch from 9f1e490 to d9d82b9 Compare August 5, 2026 15:09
@Elouan1411
Elouan1411 requested a balanced review from Copilot August 6, 2026 11:31
@Elouan1411
Elouan1411 marked this pull request as ready for review August 6, 2026 11:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (2)

app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/refreshStrategies/ThreadRecomputations.kt:184

  • Hidden reminders are only removed from messagesWithContent, but Thread.getDisplayedMessages() selects that list only when emoji reactions are available (ThreadExtensions.kt:83-85). In message mode, or for a mailbox without EMOJI_REACTION, it returns messages, so these reminders remain visible even when RESPONSE_REQUIRED is enabled. The displayed-message selection needs to apply reminder filtering independently of the reactions feature.
            val isHiddenReminder = message.shouldHideReminder
                    && (isTargetMessageInThread(targetMessageIds, threadMessageIds) || message.isScheduledDraft)
            if (isHiddenEmojiReaction.not() && isHiddenReminder.not()) messagesWithContent += message

app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/MessageController.kt:188

  • This predicate is applied only when searchQuery is nonblank. Filter-only searches are valid (SearchViewModel.computeSearchFilters accepts nonempty filters with an empty query), and the local fallback then executes the else query without this predicate, allowing hidden reminder records into results. Apply the reminder predicate to both branches.
            val isNotHiddenReminder = "(${Message::isReminder.name} == false OR ${Message::displayReminder.name} == true)"

@Elouan1411
Elouan1411 force-pushed the adapt-with-new-backend branch from 1253209 to 6e09e8d Compare August 7, 2026 13:01
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants