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

Feature/136 starting sessions #141

Merged
merged 2 commits into from
May 27, 2017
Merged

Conversation

brototyp
Copy link
Member

This PR implements the #136. I slightly changed the API from newSession() to startNewSession() to be more clear about what this does. Also I thought about when to automatically start a new session. I think the minimal setup for a new Session is on app start. So I did not implement it for app foregrounding.

@@ -24,6 +24,7 @@ final public class Tracker: NSObject {
self.queue = queue
self.dispatcher = dispatcher
super.init()
startNewSession()
startDispatchTimer()
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think of startNewSession() also calling startDispatchTimer()? Are there cases where a new session should not start a new timer?

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 wouldn't call startDispatchTimer() directly, rather dispatch(). dispatch() would dispatch the currently stored events and starts a new timer.

In this case I don't think doing any of those is what we want. Starting a new session is not necessary coupled to dispatching events. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm fine with that.

@brototyp brototyp added this to the 4.0.0 Release milestone May 25, 2017
@thorstenstark thorstenstark merged commit 5e66645 into develop May 27, 2017
@brototyp brototyp deleted the feature/136-starting-sessions branch October 3, 2018 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants