Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemilla committed Oct 10, 2023
1 parent df57617 commit c4e8a85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ dependencyResolutionManagement {
#### 2. Add the implementation to your app build.gradle file
``` gradle
dependencies {
implementation 'com.github.trycourier:courier-android:1.2.0'
implementation 'com.github.trycourier:courier-android:1.2.1'
}
```
 
Expand Down
18 changes: 4 additions & 14 deletions android/src/main/java/com/courier/android/Courier.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Courier private constructor() {
companion object {

var USER_AGENT = CourierAgent.NATIVE_ANDROID
internal const val VERSION = "1.2.0"
internal const val VERSION = "1.2.1"
internal const val TAG = "Courier SDK"
internal const val COURIER_PENDING_NOTIFICATION_KEY = "courier_pending_notification_key"
internal val eventBus by lazy { NotificationEventBus() }
Expand Down Expand Up @@ -129,19 +129,9 @@ class Courier private constructor() {
// If this fails, rethrow the exception
return@withContext try {

// Bundle all deferred requests
val updates = listOf(
async(Dispatchers.IO) {

// Refresh & update the current fcm token
val fcmToken = updateCurrentFcmToken()
return@async fcmToken?.let { setFCMToken(it) }

}
)

// Await all results
updates.awaitAll()
// Refresh & update the current fcm token
val fcmToken = updateCurrentFcmToken()
fcmToken?.let { setFCMToken(it) }

} catch (e: Exception) {

Expand Down

0 comments on commit c4e8a85

Please sign in to comment.