diff --git a/README.md b/README.md index aebf22c..e25e017 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ dependencyResolutionManagement { ```gradle dependencies { - implementation 'com.github.trycourier:courier-android:2.0.33' + implementation 'com.github.trycourier:courier-android:2.0.34' } ``` diff --git a/android/src/main/java/com/courier/android/Courier.kt b/android/src/main/java/com/courier/android/Courier.kt index 9410a1c..34702c4 100644 --- a/android/src/main/java/com/courier/android/Courier.kt +++ b/android/src/main/java/com/courier/android/Courier.kt @@ -45,7 +45,7 @@ class Courier private constructor(internal val context: Context) { companion object { var USER_AGENT = CourierAgent.NATIVE_ANDROID - internal const val VERSION = "2.0.33" + internal const val VERSION = "2.0.34" internal const val TAG = "Courier SDK" internal const val COURIER_PENDING_NOTIFICATION_KEY = "courier_pending_notification_key" internal val eventBus by lazy { NotificationEventBus() } diff --git a/android/src/main/java/com/courier/android/inbox/CourierInbox.kt b/android/src/main/java/com/courier/android/inbox/CourierInbox.kt index d3afa59..8a24f59 100644 --- a/android/src/main/java/com/courier/android/inbox/CourierInbox.kt +++ b/android/src/main/java/com/courier/android/inbox/CourierInbox.kt @@ -256,8 +256,6 @@ class CourierInbox @JvmOverloads constructor(context: Context, attrs: AttributeS }, onMessagesChanged = { messages, unreadMessageCount, totalMessageCount, canPaginate -> - mRequestedLayout = false - refreshBrand() state = if (messages.isEmpty()) State.EMPTY.apply { title = "No messages found" } else State.CONTENT @@ -425,28 +423,6 @@ class CourierInbox @JvmOverloads constructor(context: Context, attrs: AttributeS onScrollInbox = listener } - // Fixes for React Native UI bugs - - private var mRequestedLayout = false - - @SuppressLint("WrongCall") - override fun requestLayout() { - super.requestLayout() - - // We need to intercept this method because if we don't our children will never update - // Check https://stackoverflow.com/questions/49371866/recyclerview-wont-update-child-until-i-scroll - - if (!mRequestedLayout) { - mRequestedLayout = true - post { - mRequestedLayout = false - layout(left, top, right, bottom) - onLayout(false, left, top, right, bottom) - } - } - - } - }