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

[TIMOB-15205] 3_1_X iOS7 : Fire change event when there is actually a change in value. #4696

Merged
merged 2 commits into from Sep 16, 2013

Conversation

srahim
Copy link
Contributor

@srahim srahim commented Sep 16, 2013

Testing instruction in JIRA
backport of #4695


//No need to setValue, because it's already been set.
if ([self.proxy _hasListeners:@"change"])
if ([self.proxy _hasListeners:@"change"] && (current != newValue) )
Copy link
Contributor

Choose a reason for hiding this comment

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

While NSNumber bools will be constants and this will work fine, this is technically inaccurate. i.e., this should be:
&& (current != newValue) && ![current isEqual:newValue]

The pointer compare is for nil vs nil. The isEqual is for different objects holding the same value.

@WhichKatieDid
Copy link
Contributor

CR accepted, FR passed. Merging.

WhichKatieDid added a commit that referenced this pull request Sep 16, 2013
[TIMOB-15205]  3_1_X iOS7 : Fire change event when there is actually a change in value.
@WhichKatieDid WhichKatieDid merged commit c35b513 into tidev:3_1_X Sep 16, 2013
@srahim srahim deleted the TC-2945-31X branch December 10, 2013 22:08
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.

None yet

2 participants