Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unused image loader #151

Merged
merged 2 commits into from
Nov 17, 2024
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
274 changes: 137 additions & 137 deletions apps/example/ios/Podfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ commit-msg:
parallel: true
commands:
commitlint:
run: npx commitlint --edit
run: npx commitlint --edit && npx devmoji -e --lint
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"devDependencies": {
"@commitlint/config-conventional": "^17.0.2",
"commitlint": "^17.0.2",
"devmoji": "^2.3.0",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ - (instancetype)initWithFrame:(CGRect)frame
if (self = [super initWithFrame:frame]) {
static const auto defaultProps = std::make_shared<const RNCTabViewProps>();
_reactSubviews = [NSMutableArray new];
RCTImageLoader *imageLoader = [[RCTBridge currentBridge] moduleForName:@"ImageLoader"];
_tabViewProvider = [[TabViewProvider alloc] initWithDelegate:self imageLoader:imageLoader];
_tabViewProvider = [[TabViewProvider alloc] initWithDelegate:self];
self.contentView = _tabViewProvider;
_props = defaultProps;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ - (void)onPageSelectedWithKey:(NSString *)key reactTag:(NSNumber *)reactTag {

- (UIView *)view
{
RCTImageLoader *imageLoader = [self.bridge moduleForClass:[RCTImageLoader class]];
return [[TabViewProvider alloc] initWithDelegate:self imageLoader:imageLoader];
return [[TabViewProvider alloc] initWithDelegate:self];
}

@end
4 changes: 1 addition & 3 deletions packages/react-native-bottom-tabs/ios/TabViewProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import SDWebImageSVGCoder
private var props = TabViewProps()
private var hostingController: UIHostingController<TabViewImpl>?
private var coalescingKey: UInt16 = 0
private var imageLoader: RCTImageLoaderProtocol?
private var iconSize = CGSize(width: 27, height: 27)

@objc var onPageSelected: RCTDirectEventBlock?
Expand Down Expand Up @@ -159,10 +158,9 @@ import SDWebImageSVGCoder
}
}

@objc public convenience init(delegate: TabViewProviderDelegate, imageLoader: RCTImageLoader) {
@objc public convenience init(delegate: TabViewProviderDelegate) {
self.init()
self.delegate = delegate
self.imageLoader = imageLoader
SDImageCodersManager.shared.addCoder(SDImageSVGCoder.shared)
}

Expand Down
37 changes: 29 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2999,6 +2999,7 @@ __metadata:
dependencies:
"@commitlint/config-conventional": ^17.0.2
commitlint: ^17.0.2
devmoji: ^2.3.0
eslint: ^8.51.0
eslint-config-prettier: ^9.0.0
eslint-plugin-prettier: ^5.0.1
Expand Down Expand Up @@ -7149,7 +7150,7 @@ __metadata:
languageName: node
linkType: hard

"chalk@npm:4, chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.2":
"chalk@npm:4, chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2":
version: 4.1.2
resolution: "chalk@npm:4.1.2"
dependencies:
Expand Down Expand Up @@ -7588,6 +7589,13 @@ __metadata:
languageName: node
linkType: hard

"commander@npm:7.2.0, commander@npm:^7.2.0":
version: 7.2.0
resolution: "commander@npm:7.2.0"
checksum: 53501cbeee61d5157546c0bef0fedb6cdfc763a882136284bed9a07225f09a14b82d2a84e7637edfd1a679fb35ed9502fd58ef1d091e6287f60d790147f68ddc
languageName: node
linkType: hard

"commander@npm:^2.20.0":
version: 2.20.3
resolution: "commander@npm:2.20.3"
Expand All @@ -7609,13 +7617,6 @@ __metadata:
languageName: node
linkType: hard

"commander@npm:^7.2.0":
version: 7.2.0
resolution: "commander@npm:7.2.0"
checksum: 53501cbeee61d5157546c0bef0fedb6cdfc763a882136284bed9a07225f09a14b82d2a84e7637edfd1a679fb35ed9502fd58ef1d091e6287f60d790147f68ddc
languageName: node
linkType: hard

"commander@npm:^9.4.1":
version: 9.5.0
resolution: "commander@npm:9.5.0"
Expand Down Expand Up @@ -8424,6 +8425,19 @@ __metadata:
languageName: node
linkType: hard

"devmoji@npm:^2.3.0":
version: 2.3.0
resolution: "devmoji@npm:2.3.0"
dependencies:
chalk: ^4.1.1
commander: 7.2.0
ts-interface-checker: 1.0.0
bin:
devmoji: bin/devmoji.js
checksum: 8b13866422085ac6834ffcd66fc342bb56b3128d0909647c00b475d29e11be83e6035f7ffcfeca3bcfec7299a0d3e3b3b84265993885d1aff33e3fc5467f2687
languageName: node
linkType: hard

"diff-sequences@npm:^29.6.3":
version: 29.6.3
resolution: "diff-sequences@npm:29.6.3"
Expand Down Expand Up @@ -19310,6 +19324,13 @@ __metadata:
languageName: node
linkType: hard

"ts-interface-checker@npm:1.0.0":
version: 1.0.0
resolution: "ts-interface-checker@npm:1.0.0"
checksum: 3cf0b6037f3ccd6f6df1c963ce4dcff4ab540129b24d4f662b4df82abdd287276b2795824221b4bc1ae68244f03f37de90458f256e94e9de572d00ddaa023ff7
languageName: node
linkType: hard

"ts-interface-checker@npm:^0.1.9":
version: 0.1.13
resolution: "ts-interface-checker@npm:0.1.13"
Expand Down
Loading