Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Added a initial delay to the network indicator per the Apple HIG #3094

Merged
merged 2 commits into from Oct 26, 2015

Conversation

kcharwood
Copy link
Contributor

This allows us to support the recommendation from the Apple HIG, which is short requests that last less than a couple of seconds should not trigger the network activity indicator.

Originally brought up in #3086 by @lubiluk

cc @cnoon @kylef @jshier for review.

@kcharwood kcharwood added this to the 3.0.0 milestone Oct 23, 2015
- (void)startActivationDelayTimer {
self.activationDelayTimer = [NSTimer
timerWithTimeInterval:self.activationDelay target:self selector:@selector(activationDelayTimerFired) userInfo:nil repeats:NO];
[[NSRunLoop mainRunLoop] addTimer:self.activationDelayTimer forMode:NSRunLoopCommonModes];
Copy link
Member

Choose a reason for hiding this comment

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

You probably want to add the timers to the UITrackingRunLoopMode mode as well for iOS targets. Otherwise you won't get called back when scrolling which is probably not what you want.

@cnoon
Copy link
Member

cnoon commented Oct 23, 2015

Overall I think this looks really good @kcharwood. Once you figure out what you'd like to do with the comments I pointed out, you've got a thumbs up from me. 👍🏼

- Refactored test class to begin using common timeout across all classes
@kcharwood
Copy link
Contributor Author

Test failing due to unrelated issue. Will address those in another PR.

kcharwood added a commit that referenced this pull request Oct 26, 2015
…ty_delay

A refactored version of #3086 allowing a delayed start to the network activity indicator
@kcharwood kcharwood merged commit f8abf69 into 3_0_0_branch Oct 26, 2015
@kcharwood kcharwood deleted the 3.0_feature/network_activity_delay branch October 26, 2015 14:23
@kcharwood kcharwood changed the title A refactored version of #3086 allowing a delayed start to the network activity indicator Added a initial delay to the network indicator per the Apple HIG Nov 5, 2015
@kcharwood kcharwood added the added label Nov 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants