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

Do not activate if fetch returns NO_CHANGE #4260

Merged
merged 4 commits into from Nov 8, 2019
Merged

Do not activate if fetch returns NO_CHANGE #4260

merged 4 commits into from Nov 8, 2019

Conversation

dmandar
Copy link
Collaborator

@dmandar dmandar commented Nov 7, 2019

Fixes internal bug: 143622863. We activate only if fetched data has not resulted in a data change. We track this using the last time the ETag was changed (corresponds to a real change to the RC template).
This change also mirrors current android behavior.

@@ -76,6 +76,8 @@
@property(nonatomic, readwrite, assign) NSTimeInterval lastSetDefaultsTimeInterval;
/// The latest eTag value stored from the last successful response.
@property(nonatomic, readwrite, assign) NSString *lastETag;
/// The timestamp of the last eTag update.
@property(nonatomic, readwrite, assign) NSTimeInterval lastETagUpdateTime;
Copy link
Contributor

@chliangGoogle chliangGoogle Nov 7, 2019

Choose a reason for hiding this comment

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

should we persist this value? cuz what happened before the current app launch.

Copy link
Collaborator Author

@dmandar dmandar Nov 8, 2019

Choose a reason for hiding this comment

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

good pt. Done.

DISPATCH_QUEUE_SERIAL);
_configFetch[i] = OCMPartialMock([[RCNConfigFetch alloc] initWithContent:configContent
DBManager:_DBManager
settings:settings
Copy link
Contributor

@chliangGoogle chliangGoogle Nov 7, 2019

Choose a reason for hiding this comment

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

is this format right? Maybe run script/style.sh

Copy link
Collaborator Author

@dmandar dmandar Nov 8, 2019

Choose a reason for hiding this comment

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

This is with style.sh.

@dmandar dmandar merged commit 3b9fd3d into master Nov 8, 2019
4 checks passed
@firebase firebase locked and limited conversation to collaborators Dec 9, 2019
@paulb777 paulb777 deleted the md-nochangebugfix branch Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants