Skip to content

Commit

Permalink
Native SDK update Android3.6.1 and iOS2.16.2
Browse files Browse the repository at this point in the history
  • Loading branch information
adam1929 committed May 22, 2023
1 parent 130d913 commit 9080383
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 30 deletions.
3 changes: 2 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+' // From node_modules
implementation 'com.exponea.sdk:sdk:3.5.0'
implementation 'com.exponea.sdk:sdk:3.6.1'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'org.danilopianini:gson-extras:0.2.2'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

Expand Down
16 changes: 2 additions & 14 deletions android/src/main/java/com/exponea/ReactNativeAppInboxProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener
import com.exponea.sdk.models.MessageItem
import com.exponea.sdk.services.DefaultAppInboxProvider
import com.exponea.sdk.util.MessageItemViewHolder
import com.exponea.sdk.view.AppInboxDetailView
import com.exponea.sdk.view.AppInboxListView
import com.exponea.style.AppInboxStyle
Expand Down Expand Up @@ -61,7 +62,7 @@ class ReactNativeAppInboxProvider(private val appInboxStyle: AppInboxStyle) : De
// (performance) register listener only if item style is set
view.listView.addOnChildAttachStateChangeListener(object : OnChildAttachStateChangeListener {
override fun onChildViewAttachedToWindow(view: View) {
itemStyle.applyTo(ReactNativeMessageItemViewHolder(view))
itemStyle.applyTo(MessageItemViewHolder(view))
}

override fun onChildViewDetachedFromWindow(view: View) {
Expand All @@ -71,17 +72,4 @@ class ReactNativeAppInboxProvider(private val appInboxStyle: AppInboxStyle) : De
}
return view
}

/**
* As MessageItemViewHolder from SDK is internal, we need to create mirror.
*/
class ReactNativeMessageItemViewHolder(target: View) {
val TODO_REMOVE_ME: RelativeLayout? = target.findViewById(R.id.action_bar_subtitle)
val itemContainer: RelativeLayout? = target.findViewById(R.id.message_item_container)
val readFlag: ImageView? = target.findViewById(R.id.message_item_read_flag)
val receivedTime: TextView? = target.findViewById(R.id.message_item_received_time)
val title: TextView? = target.findViewById(R.id.message_item_title)
val content: TextView? = target.findViewById(R.id.message_item_content)
val image: ImageView? = target.findViewById(R.id.message_item_image)
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.exponea.style

import com.exponea.ReactNativeAppInboxProvider.ReactNativeMessageItemViewHolder
import com.exponea.asColor
import com.exponea.sdk.util.MessageItemViewHolder
import com.facebook.react.bridge.DynamicFromObject

data class AppInboxListItemStyle(
Expand All @@ -12,7 +12,7 @@ data class AppInboxListItemStyle(
var content: TextViewStyle? = null,
var image: ImageViewStyle? = null
) {
fun applyTo(target: ReactNativeMessageItemViewHolder) {
fun applyTo(target: MessageItemViewHolder) {
DynamicFromObject(backgroundColor).asColor()?.let {
target.itemContainer?.setBackgroundColor(it)
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ dependencies {
gmsImplementation 'com.google.firebase:firebase-messaging:23.0.0'
hmsImplementation 'com.huawei.agconnect:agconnect-core:1.5.2.300'
hmsImplementation 'com.huawei.hms:push:6.3.0.302'
implementation 'com.exponea.sdk:sdk:3.5.0'
implementation 'com.exponea.sdk:sdk:3.6.1'
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
implementation 'com.google.code.gson:gson:2.8.9'

Expand Down
12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ PODS:
- boost (1.76.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- ExponeaSDK (2.16.1):
- ExponeaSDK (2.16.2):
- SwiftSoup (= 2.4.3)
- ExponeaSDK-Notifications (2.16.1)
- ExponeaSDK-Notifications (2.16.2)
- FBLazyVector (0.70.7)
- FBReactNativeSpec (0.70.7):
- RCT-Folly (= 2021.07.22.00)
Expand Down Expand Up @@ -290,7 +290,7 @@ PODS:
- glog
- react-native-exponea-sdk (1.4.0):
- AnyCodable-FlightSchool (= 0.4.0)
- ExponeaSDK (= 2.16.1)
- ExponeaSDK (= 2.16.2)
- React-Core
- react-native-safe-area-context (4.5.0):
- RCT-Folly
Expand Down Expand Up @@ -579,8 +579,8 @@ SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
ExponeaSDK: daf1d20e9e2c1dfe5f5658a580d48aee6ac4b69b
ExponeaSDK-Notifications: 06a80afcfd91283fee59ed59eb841ac86a7af540
ExponeaSDK: 485fcf173241a779d6567f44139cfbc2a4ddd775
ExponeaSDK-Notifications: 6541a7762946a3ae4990738e89b6db700f065b19
FBLazyVector: a6454570f573a0f6f1d397e5a95c13e8e45d1700
FBReactNativeSpec: 09e8dfba44487e5dc4882a9f5318cde67549549c
Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
Expand Down Expand Up @@ -610,7 +610,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: e95cdd036e7947ddf87f3049319ac3064deb76b5
React-jsinspector: 1c34fea1868136ecde647bc11fae9266d4143693
React-logger: e9f407f9fdf3f3ce7749ae6f88affe63e8446019
react-native-exponea-sdk: 9ccce2214a5943e202a029304473bdde4863453d
react-native-exponea-sdk: fb4df1730f6b1b8b5dde291b27a445c777d11dd9
react-native-safe-area-context: 39c2d8be3328df5d437ac1700f4f3a4f75716acc
React-perflogger: 52a94f38c19a518d05726624b49bfc192639374d
React-RCTActionSheet: 7b89fe64a852bc3ae39b91dbd142ef09931ef3f7
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ target 'Exponea' do

use_react_native!(:path => config[:reactNativePath])

pod "ExponeaSDK", "2.16.1"
pod "ExponeaSDK", "2.16.2"
pod 'AnyCodable-FlightSchool', '0.4.0'
end

Expand Down
8 changes: 4 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PODS:
- AnyCodable-FlightSchool (0.4.0)
- boost (1.76.0)
- DoubleConversion (1.1.6)
- ExponeaSDK (2.16.1):
- ExponeaSDK (2.16.2):
- SwiftSoup (= 2.4.3)
- FBLazyVector (0.70.7)
- FBReactNativeSpec (0.70.7):
Expand Down Expand Up @@ -317,7 +317,7 @@ DEPENDENCIES:
- AnyCodable-FlightSchool (= 0.4.0)
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- ExponeaSDK (= 2.16.1)
- ExponeaSDK (= 2.16.2)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
Expand Down Expand Up @@ -439,7 +439,7 @@ SPEC CHECKSUMS:
AnyCodable-FlightSchool: 9bf42632b5256c78710e2f4fb18ce78e89180883
boost: a7c83b31436843459a1961bfd74b96033dc77234
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
ExponeaSDK: daf1d20e9e2c1dfe5f5658a580d48aee6ac4b69b
ExponeaSDK: 485fcf173241a779d6567f44139cfbc2a4ddd775
FBLazyVector: a6454570f573a0f6f1d397e5a95c13e8e45d1700
FBReactNativeSpec: 09e8dfba44487e5dc4882a9f5318cde67549549c
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
Expand Down Expand Up @@ -478,6 +478,6 @@ SPEC CHECKSUMS:
SwiftSoup: 3384f2e618cfc1b3cbc7852c16692fe8de13fb8f
Yoga: 92d086bb705a41cc588599b51db726ba7b1d341c

PODFILE CHECKSUM: a29c2340ed23c08f66229b04a20f01d61bda2c98
PODFILE CHECKSUM: 158fbbb70f5a17f417d59657f6bd0690998e9322

COCOAPODS: 1.11.3
2 changes: 1 addition & 1 deletion react-native-exponea-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Pod::Spec.new do |s|
s.requires_arc = true

s.dependency "React-Core"
s.dependency "ExponeaSDK", "2.16.1"
s.dependency "ExponeaSDK", "2.16.2"
s.dependency "AnyCodable-FlightSchool", "0.4.0"

# Don't install the dependencies when we run `pod install` in the old architecture.
Expand Down

0 comments on commit 9080383

Please sign in to comment.