Skip to content

Only update uiState once in checkSyncSettings#703

Merged
ArnyminerZ merged 1 commit into
devfrom
checkSyncSettings-update-uiState-once
Sep 12, 2025
Merged

Only update uiState once in checkSyncSettings#703
ArnyminerZ merged 1 commit into
devfrom
checkSyncSettings-update-uiState-once

Conversation

@ArnyminerZ

@ArnyminerZ ArnyminerZ commented Sep 11, 2025

Copy link
Copy Markdown
Member

Purpose

I think we were updating uiState too many times in so little time.

Short description

Joined the multiple uiState updates and copying to a single call in checkSyncSettings.

Closes #658

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.

Signed-off-by: Arnau Mora <arnyminerz@proton.me>
@ArnyminerZ ArnyminerZ self-assigned this Sep 11, 2025
@ArnyminerZ ArnyminerZ added the bug label Sep 11, 2025
@ArnyminerZ
ArnyminerZ marked this pull request as ready for review September 11, 2025 10:33
@ArnyminerZ
ArnyminerZ requested a review from Copilot September 11, 2025 10:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 optimizes the checkSyncSettings function by consolidating multiple sequential uiState.copy() calls into a single update operation, reducing redundant state mutations and improving performance.

  • Combines four separate uiState assignments into one batch update
  • Minor code formatting improvement for method parameter line breaking

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sunkup
sunkup self-requested a review September 11, 2025 12:20

@sunkup sunkup left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Weird, but seems like that does the trick 👍

@sunkup sunkup added this to the 2.4.2 milestone Sep 11, 2025
@ArnyminerZ
ArnyminerZ merged commit 0b68f98 into dev Sep 12, 2025
8 checks passed
@ArnyminerZ
ArnyminerZ deleted the checkSyncSettings-update-uiState-once branch September 12, 2025 06:37
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