Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/src/main/java/com/rcttabview/RCTTabView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import android.annotation.SuppressLint
import android.content.Context
import android.content.res.ColorStateList
import android.graphics.Typeface
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.ColorDrawable
import android.graphics.drawable.Drawable
import android.os.Build
Expand All @@ -17,6 +16,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.appcompat.content.res.AppCompatResources
import com.bumptech.glide.Glide
import com.bumptech.glide.load.DataSource
import com.bumptech.glide.load.engine.GlideException
import com.bumptech.glide.request.RequestListener
Expand Down Expand Up @@ -177,7 +177,7 @@ class ReactBottomNavigationView(context: Context) : BottomNavigationView(context

@SuppressLint("CheckResult")
private fun getDrawable(imageSource: ImageSource, onDrawableReady: (Drawable?) -> Unit) {
GlideApp.with(context)
Glide.with(context)
.`as`(Drawable::class.java)
.load(imageSource.uri)
.listener(object : RequestListener<Drawable> {
Expand Down
26 changes: 13 additions & 13 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-bottom-tabs (0.4.0):
- react-native-bottom-tabs (0.5.0):
- DoubleConversion
- glog
- RCT-Folly (= 2024.01.01.00)
Expand All @@ -1222,19 +1222,19 @@ PODS:
- React-graphics
- React-ImageManager
- React-jsi
- react-native-bottom-tabs/common (= 0.4.0)
- react-native-bottom-tabs/common (= 0.5.0)
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- SDWebImage (~> 5.11.1)
- SDWebImageSVGCoder (~> 1.7.0)
- SDWebImage (>= 5.19.1)
- SDWebImageSVGCoder (>= 1.7.0)
- SwiftUIIntrospect (~> 1.0)
- Yoga
- react-native-bottom-tabs/common (0.4.0):
- react-native-bottom-tabs/common (0.5.0):
- DoubleConversion
- glog
- RCT-Folly (= 2024.01.01.00)
Expand All @@ -1254,8 +1254,8 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- SDWebImage (~> 5.11.1)
- SDWebImageSVGCoder (~> 1.7.0)
- SDWebImage (>= 5.19.1)
- SDWebImageSVGCoder (>= 1.7.0)
- SwiftUIIntrospect (~> 1.0)
- Yoga
- react-native-safe-area-context (4.11.0):
Expand Down Expand Up @@ -1681,9 +1681,9 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- SDWebImage (5.11.1):
- SDWebImage/Core (= 5.11.1)
- SDWebImage/Core (5.11.1)
- SDWebImage (5.20.0):
- SDWebImage/Core (= 5.20.0)
- SDWebImage/Core (5.20.0)
- SDWebImageSVGCoder (1.7.0):
- SDWebImage/Core (~> 5.6)
- SocketRocket (0.7.0)
Expand Down Expand Up @@ -1945,7 +1945,7 @@ SPEC CHECKSUMS:
React-logger: 4072f39df335ca443932e0ccece41fbeb5ca8404
React-Mapbuffer: 714f2fae68edcabfc332b754e9fbaa8cfc68fdd4
React-microtasksnativemodule: 2eb1a69d35e700f752944644c0295cf7161d06c5
react-native-bottom-tabs: 930f7bdb6e9122a519f7a50a83908e6fe04090e6
react-native-bottom-tabs: fde2fbce1c50e4df9288e0d4f983301e02e88d81
react-native-safe-area-context: c6e59b0ac0acb3ddc3247235215775441ca1b2ff
React-nativeconfig: 4a9543185905fe41014c06776bf126083795aed9
React-NativeModulesApple: 651670a799672bd54469f2981d91493dda361ddf
Expand Down Expand Up @@ -1978,12 +1978,12 @@ SPEC CHECKSUMS:
RNGestureHandler: 6a34af1ea5d9321af615933c271b0c37a00ff473
RNScreens: d4551ceaec50b2fd6648e36d2e47dd42ef9ccfef
RNVectorIcons: a1344e212e80e6e0f4537a9960148201175f4225
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
SwiftUIIntrospect: fee9aa07293ee280373a591e1824e8ddc869ba5d
Yoga: 4ef80d96a5534f0e01b3055f17d1e19a9fc61b63

PODFILE CHECKSUM: ec8970ff5a624fb462d3b2cd6e966645a41c4daa
PODFILE CHECKSUM: 1c1dbca3e400ef935aa9a150cb2dcb58fb8c4536

COCOAPODS: 1.15.2
4 changes: 1 addition & 3 deletions ios/TabViewImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ struct TabViewImpl: View {
.introspectTabView(closure: { tabController in
tabBar = tabController.tabBar
})
.onChange(of: tabBar) { newValue in
updateTabBarAppearance(props: props, tabBar: tabBar)
}
.configureAppearance(props: props, tabBar: tabBar)
.tintColor(props.selectedActiveTintColor)
.getSidebarAdaptable(enabled: props.sidebarAdaptable ?? false)
Expand Down Expand Up @@ -130,6 +127,7 @@ struct TabViewImpl: View {
.tabBadge(tabData?.badge)
#if os(iOS)
.onAppear {
updateTabBarAppearance(props: props, tabBar: tabBar)
guard index >= 4,
let key = tabData?.key,
props.selectedPage != key else { return }
Expand Down
9 changes: 3 additions & 6 deletions ios/TabViewProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ import SDWebImageSVGCoder
}

let context: [SDWebImageContextOption: Any]? = isSVG ? [
.imageThumbnailPixelSize: iconSize
.imageThumbnailPixelSize: iconSize,
.imagePreserveAspectRatio: true
] : nil

SDWebImageManager.shared.loadImage(
Expand All @@ -227,11 +228,7 @@ import SDWebImageSVGCoder
guard let self = self else { return }
DispatchQueue.main.async {
if let image {
if isSVG {
self.props.icons[index] = image
} else {
self.props.icons[index] = image.resizeImageTo(size: self.iconSize)
}
self.props.icons[index] = image.resizeImageTo(size: self.iconSize)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions react-native-bottom-tabs.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Pod::Spec.new do |s|
end

s.dependency "SwiftUIIntrospect", '~> 1.0'
s.dependency 'SDWebImage', '~> 5.11.1'
s.dependency 'SDWebImageSVGCoder', '~> 1.7.0'
s.dependency 'SDWebImage', '>= 5.19.1'
s.dependency 'SDWebImageSVGCoder', '>= 1.7.0'

s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES'
Expand Down
Loading