Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correctly update Message fields #2236

Merged
merged 7 commits into from
Mar 11, 2025

Conversation

KevinBoulongne
Copy link
Contributor

@KevinBoulongne KevinBoulongne commented Mar 7, 2025

Depends on #2240

@KevinBoulongne KevinBoulongne requested a review from LunarX March 7, 2025 12:13
@github-actions github-actions bot added the dependent This MR depends on another PR label Mar 7, 2025
@KevinBoulongne KevinBoulongne force-pushed the message-initLocalValues branch from c26faf6 to 0b40d83 Compare March 7, 2025 12:19
@KevinBoulongne KevinBoulongne force-pushed the refresh-strategy-for-deleted branch from 280ebc3 to 22e5c6f Compare March 7, 2025 12:21
@KevinBoulongne KevinBoulongne force-pushed the message-initLocalValues branch from 0b40d83 to 2172c7b Compare March 7, 2025 12:21
@KevinBoulongne KevinBoulongne enabled auto-merge March 7, 2025 12:23
@KevinBoulongne KevinBoulongne changed the title fix: Correctly update Message realmLists fix: Correctly update Message fields Mar 7, 2025
@KevinBoulongne KevinBoulongne force-pushed the refresh-strategy-for-deleted branch from 22e5c6f to 74ec48c Compare March 10, 2025 13:30
@KevinBoulongne KevinBoulongne force-pushed the message-initLocalValues branch from b0053f3 to 6b21ef2 Compare March 10, 2025 13:30
@KevinBoulongne KevinBoulongne force-pushed the refresh-strategy-for-deleted branch from 74ec48c to 00ee591 Compare March 10, 2025 16:17
Base automatically changed from refresh-strategy-for-deleted to snooze-feature-branch March 10, 2025 16:23
@github-actions github-actions bot removed the dependent This MR depends on another PR label Mar 10, 2025
@KevinBoulongne KevinBoulongne force-pushed the message-initLocalValues branch 2 times, most recently from 5a5601e to eaa2a0b Compare March 11, 2025 08:12
@KevinBoulongne KevinBoulongne changed the base branch from snooze-feature-branch to snooze-message-ordering March 11, 2025 08:12
@github-actions github-actions bot added the dependent This MR depends on another PR label Mar 11, 2025
@KevinBoulongne KevinBoulongne force-pushed the message-initLocalValues branch from eaa2a0b to 528fa95 Compare March 11, 2025 08:29
Base automatically changed from snooze-message-ordering to snooze-feature-branch March 11, 2025 08:56
@github-actions github-actions bot removed the dependent This MR depends on another PR label Mar 11, 2025
Copy link

This PR/issue depends on:

@LunarX LunarX force-pushed the snooze-feature-branch branch from 6d30941 to cd8adda Compare March 11, 2025 08:58
@KevinBoulongne KevinBoulongne force-pushed the message-initLocalValues branch from 528fa95 to 3c96f33 Compare March 11, 2025 09:03
Copy link
Contributor

@LunarX LunarX left a comment

Choose a reason for hiding this comment

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

Also we should be able to a fun keepLocalValues(localMessage: Message) as follows and only call it when adding new message in the snooze strategy and when we already have a local message in the search. The reste of the time we can call the already existing initLocalValues()

fun keepLocalValues(localMessage: Message) {
    initLocalValues(
        isFullyDownloaded = localMessage._isFullyDownloaded,
        isTrashed = localMessage.isTrashed,
        messageIds = localMessage.messageIds,
        draftLocalUuid = localMessage.draftLocalUuid,
        isFromSearch = localMessage.isFromSearch,
        isDeletedOnApi = localMessage.isDeletedOnApi,
        latestCalendarEventResponse = localMessage.latestCalendarEventResponse,
        swissTransferFiles = localMessage.swissTransferFiles,
    )
    keepHeavyData(localMessage)
}

Copy link

@KevinBoulongne KevinBoulongne requested a review from LunarX March 11, 2025 11:11
@KevinBoulongne KevinBoulongne requested a review from LunarX March 11, 2025 12:09
@KevinBoulongne KevinBoulongne merged commit a168ee1 into snooze-feature-branch Mar 11, 2025
6 checks passed
@KevinBoulongne KevinBoulongne deleted the message-initLocalValues branch March 11, 2025 12:16
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