-
Notifications
You must be signed in to change notification settings - Fork 199
fix: Amplitude session_id fix #1104
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
base: master
Are you sure you want to change the base?
Conversation
- added unit test cases - refactored plugin code to be in sync with swift code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implementation mostly correct, but missing saveSessionData on a few places. probably cleaner to do the following:
- write a function (or make a property) for
eventSessionId. every time it is updated, update it to storage. you only want to updateeventSessionIdto storage. - write a function (or make a property) for
lastEventTime. every time it is updated, update it to storage. you only want to updatelastEventTimeto storage. - you no longer need
saveSessionDataonce you did 1 & 2
…Event_Time to automatic update to storage - Added new properties - Modified persistent test cases
| this.lastEventTime = -1; | ||
| await AsyncStorage.removeItem(SESSION_ID_KEY); | ||
| await AsyncStorage.removeItem(LAST_EVENT_TIME_KEY); | ||
| await AsyncStorage.multiRemove([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: only need to remove sessionId, since eventSessionId and lastEventTime are set to -1 by the setter
No description provided.