-
Notifications
You must be signed in to change notification settings - Fork 1
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
[MOBL-1399] Events module rewrite in Kotlin language #363
Conversation
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.
LGTM
|
||
return result; | ||
BlueshiftNetworkRepositoryImpl networkRepository = new BlueshiftNetworkRepositoryImpl(); |
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.
If the line crashes, the catch block will be able to catch the exception and print the log.
BulkEventManager.enqueueBulkEvents(context); | ||
// Sync the http request queue. | ||
RequestQueue.getInstance().sync(context); | ||
}); |
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.
Keeping a flag to check if the queue was emptied before is a bit tricky and won't give accurate answer all the time. Both these calls have internal checks to make sure we are not running into expensive operations if the queue is empty.
…n tracking is disabled.
…tworkRequestRepositoryImpl
fun setDatacenter_whenSetToEU_shouldReturnCorrectURLForAllAPIsWithEUBaseUrl() { | ||
BlueshiftAPI.setDatacenter(BlueshiftAPI.Datacenter.EU) | ||
|
||
val baseUrlForUS = "https://api.eu.getblueshift.com/" |
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.
fix the naming
The event module is rewritten using Kotlin for an improved structure and performance. This code is covered with test cases.