Skip to content

Run checkSyncSettings on lifecycle resume#659

Merged
sunkup merged 1 commit into
devfrom
658-warning-cards-dont-disappear-automatically
Aug 19, 2025
Merged

Run checkSyncSettings on lifecycle resume#659
sunkup merged 1 commit into
devfrom
658-warning-cards-dont-disappear-automatically

Conversation

@ArnyminerZ
Copy link
Copy Markdown
Member

Purpose

Before #640 we were calling checkSyncSettings in the activity's onResume function.

However, after the PR, it was replaced by a simple LaunchedEffect. It should be LifecycleResumeEffect to match the original behavior.

Short description

Moved checkSyncSettings to a LifecycleResumeEffect.

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@ArnyminerZ ArnyminerZ linked an issue Aug 19, 2025 that may be closed by this pull request
@ArnyminerZ ArnyminerZ requested a review from Copilot August 19, 2025 12:26
@ArnyminerZ ArnyminerZ self-assigned this Aug 19, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes when checkSyncSettings is called to match the original lifecycle behavior before PR #640. The change ensures that sync settings are checked whenever the screen resumes, not just when it's initially launched.

  • Moved checkSyncSettings call from LaunchedEffect to LifecycleResumeEffect
  • Added import for LifecycleResumeEffect
  • Maintained the existing permission request logic in LaunchedEffect

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@ArnyminerZ ArnyminerZ added the bug label Aug 19, 2025
@ArnyminerZ ArnyminerZ requested a review from sunkup August 19, 2025 12:27
@ArnyminerZ ArnyminerZ marked this pull request as ready for review August 19, 2025 12:28
Copy link
Copy Markdown
Member

@sunkup sunkup left a comment

Choose a reason for hiding this comment

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

That works. I wonder whether we can get rid of the effects at some point ...

@sunkup sunkup merged commit 403bec8 into dev Aug 19, 2025
7 checks passed
@sunkup sunkup deleted the 658-warning-cards-dont-disappear-automatically branch August 19, 2025 14:21
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.

Warning cards don't disappear automatically

3 participants