Skip to content

Commit 653fafe

Browse files
authored
fix: bump SDWebImage (#142)
* fix: bump sdwebimage * fix: android use Glide instead of GlideApp
1 parent 2a5c6d8 commit 653fafe

File tree

5 files changed

+21
-26
lines changed

5 files changed

+21
-26
lines changed

android/src/main/java/com/rcttabview/RCTTabView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import android.annotation.SuppressLint
44
import android.content.Context
55
import android.content.res.ColorStateList
66
import android.graphics.Typeface
7-
import android.graphics.drawable.BitmapDrawable
87
import android.graphics.drawable.ColorDrawable
98
import android.graphics.drawable.Drawable
109
import android.os.Build
@@ -17,6 +16,7 @@ import android.view.View
1716
import android.view.ViewGroup
1817
import android.widget.TextView
1918
import androidx.appcompat.content.res.AppCompatResources
19+
import com.bumptech.glide.Glide
2020
import com.bumptech.glide.load.DataSource
2121
import com.bumptech.glide.load.engine.GlideException
2222
import com.bumptech.glide.request.RequestListener
@@ -177,7 +177,7 @@ class ReactBottomNavigationView(context: Context) : BottomNavigationView(context
177177

178178
@SuppressLint("CheckResult")
179179
private fun getDrawable(imageSource: ImageSource, onDrawableReady: (Drawable?) -> Unit) {
180-
GlideApp.with(context)
180+
Glide.with(context)
181181
.`as`(Drawable::class.java)
182182
.load(imageSource.uri)
183183
.listener(object : RequestListener<Drawable> {

example/ios/Podfile.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ PODS:
12091209
- ReactCommon/turbomodule/bridging
12101210
- ReactCommon/turbomodule/core
12111211
- Yoga
1212-
- react-native-bottom-tabs (0.4.0):
1212+
- react-native-bottom-tabs (0.5.0):
12131213
- DoubleConversion
12141214
- glog
12151215
- RCT-Folly (= 2024.01.01.00)
@@ -1222,19 +1222,19 @@ PODS:
12221222
- React-graphics
12231223
- React-ImageManager
12241224
- React-jsi
1225-
- react-native-bottom-tabs/common (= 0.4.0)
1225+
- react-native-bottom-tabs/common (= 0.5.0)
12261226
- React-NativeModulesApple
12271227
- React-RCTFabric
12281228
- React-rendererdebug
12291229
- React-utils
12301230
- ReactCodegen
12311231
- ReactCommon/turbomodule/bridging
12321232
- ReactCommon/turbomodule/core
1233-
- SDWebImage (~> 5.11.1)
1234-
- SDWebImageSVGCoder (~> 1.7.0)
1233+
- SDWebImage (>= 5.19.1)
1234+
- SDWebImageSVGCoder (>= 1.7.0)
12351235
- SwiftUIIntrospect (~> 1.0)
12361236
- Yoga
1237-
- react-native-bottom-tabs/common (0.4.0):
1237+
- react-native-bottom-tabs/common (0.5.0):
12381238
- DoubleConversion
12391239
- glog
12401240
- RCT-Folly (= 2024.01.01.00)
@@ -1254,8 +1254,8 @@ PODS:
12541254
- ReactCodegen
12551255
- ReactCommon/turbomodule/bridging
12561256
- ReactCommon/turbomodule/core
1257-
- SDWebImage (~> 5.11.1)
1258-
- SDWebImageSVGCoder (~> 1.7.0)
1257+
- SDWebImage (>= 5.19.1)
1258+
- SDWebImageSVGCoder (>= 1.7.0)
12591259
- SwiftUIIntrospect (~> 1.0)
12601260
- Yoga
12611261
- react-native-safe-area-context (4.11.0):
@@ -1681,9 +1681,9 @@ PODS:
16811681
- ReactCommon/turbomodule/bridging
16821682
- ReactCommon/turbomodule/core
16831683
- Yoga
1684-
- SDWebImage (5.11.1):
1685-
- SDWebImage/Core (= 5.11.1)
1686-
- SDWebImage/Core (5.11.1)
1684+
- SDWebImage (5.20.0):
1685+
- SDWebImage/Core (= 5.20.0)
1686+
- SDWebImage/Core (5.20.0)
16871687
- SDWebImageSVGCoder (1.7.0):
16881688
- SDWebImage/Core (~> 5.6)
16891689
- SocketRocket (0.7.0)
@@ -1945,7 +1945,7 @@ SPEC CHECKSUMS:
19451945
React-logger: 4072f39df335ca443932e0ccece41fbeb5ca8404
19461946
React-Mapbuffer: 714f2fae68edcabfc332b754e9fbaa8cfc68fdd4
19471947
React-microtasksnativemodule: 2eb1a69d35e700f752944644c0295cf7161d06c5
1948-
react-native-bottom-tabs: 930f7bdb6e9122a519f7a50a83908e6fe04090e6
1948+
react-native-bottom-tabs: fde2fbce1c50e4df9288e0d4f983301e02e88d81
19491949
react-native-safe-area-context: c6e59b0ac0acb3ddc3247235215775441ca1b2ff
19501950
React-nativeconfig: 4a9543185905fe41014c06776bf126083795aed9
19511951
React-NativeModulesApple: 651670a799672bd54469f2981d91493dda361ddf
@@ -1978,12 +1978,12 @@ SPEC CHECKSUMS:
19781978
RNGestureHandler: 6a34af1ea5d9321af615933c271b0c37a00ff473
19791979
RNScreens: d4551ceaec50b2fd6648e36d2e47dd42ef9ccfef
19801980
RNVectorIcons: a1344e212e80e6e0f4537a9960148201175f4225
1981-
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
1981+
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
19821982
SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c
19831983
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
19841984
SwiftUIIntrospect: fee9aa07293ee280373a591e1824e8ddc869ba5d
19851985
Yoga: 4ef80d96a5534f0e01b3055f17d1e19a9fc61b63
19861986

1987-
PODFILE CHECKSUM: ec8970ff5a624fb462d3b2cd6e966645a41c4daa
1987+
PODFILE CHECKSUM: 1c1dbca3e400ef935aa9a150cb2dcb58fb8c4536
19881988

19891989
COCOAPODS: 1.15.2

ios/TabViewImpl.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ struct TabViewImpl: View {
8484
.introspectTabView(closure: { tabController in
8585
tabBar = tabController.tabBar
8686
})
87-
.onChange(of: tabBar) { newValue in
88-
updateTabBarAppearance(props: props, tabBar: tabBar)
89-
}
9087
.configureAppearance(props: props, tabBar: tabBar)
9188
.tintColor(props.selectedActiveTintColor)
9289
.getSidebarAdaptable(enabled: props.sidebarAdaptable ?? false)
@@ -130,6 +127,7 @@ struct TabViewImpl: View {
130127
.tabBadge(tabData?.badge)
131128
#if os(iOS)
132129
.onAppear {
130+
updateTabBarAppearance(props: props, tabBar: tabBar)
133131
guard index >= 4,
134132
let key = tabData?.key,
135133
props.selectedPage != key else { return }

ios/TabViewProvider.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ import SDWebImageSVGCoder
215215
}
216216

217217
let context: [SDWebImageContextOption: Any]? = isSVG ? [
218-
.imageThumbnailPixelSize: iconSize
218+
.imageThumbnailPixelSize: iconSize,
219+
.imagePreserveAspectRatio: true
219220
] : nil
220221

221222
SDWebImageManager.shared.loadImage(
@@ -227,11 +228,7 @@ import SDWebImageSVGCoder
227228
guard let self = self else { return }
228229
DispatchQueue.main.async {
229230
if let image {
230-
if isSVG {
231-
self.props.icons[index] = image
232-
} else {
233-
self.props.icons[index] = image.resizeImageTo(size: self.iconSize)
234-
}
231+
self.props.icons[index] = image.resizeImageTo(size: self.iconSize)
235232
}
236233
}
237234
}

react-native-bottom-tabs.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Pod::Spec.new do |s|
2626
end
2727

2828
s.dependency "SwiftUIIntrospect", '~> 1.0'
29-
s.dependency 'SDWebImage', '~> 5.11.1'
30-
s.dependency 'SDWebImageSVGCoder', '~> 1.7.0'
29+
s.dependency 'SDWebImage', '>= 5.19.1'
30+
s.dependency 'SDWebImageSVGCoder', '>= 1.7.0'
3131

3232
s.pod_target_xcconfig = {
3333
'DEFINES_MODULE' => 'YES'

0 commit comments

Comments
 (0)