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(Android): missing negation in check for mismatched frames #2214

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Jun 26, 2024

Description

The error check was bad - it reported error each time the frames were the same.
Obviously it shoud report frame mismatch.

Changes

Added missing negation.

Checklist

  • Ensured that CI passes

@kkafar kkafar requested review from alduzy and tboba June 27, 2024 07:53
Copy link
Member

@alduzy alduzy left a comment

Choose a reason for hiding this comment

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

LGTM 👍
One refactor to consider

@@ -51,7 +51,7 @@ class RNSScreenComponentDescriptor final
// state update.
if (screenShadowNode.getFrameCorrectionModes().check(
FrameCorrectionModes::Mode::FrameHeightCorrection) &&
compareFrameSizes(
!compareFrameSizes(
Copy link
Member

Choose a reason for hiding this comment

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

We could consider changing the name of this function to something like checkIsFrameSizeEqual so that it's obvious what it returns.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is good suggestion. compare may suggest inequality, right?
I'll do it in separate PR, thanks!

@kkafar kkafar merged commit 572e601 into main Jun 27, 2024
7 checks passed
@kkafar kkafar deleted the @kkafar/fix-bad-error branch June 27, 2024 10:04
alduzy pushed a commit that referenced this pull request Jun 28, 2024
## Description

The error check was bad - it reported error each time the frames were
the same.
Obviously it shoud report frame mismatch.


## Changes

Added missing negation.

## Checklist

- [x] Ensured that CI passes
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