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

build: update external dependencies #271

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### 1.2.1
- **Update**: RxSwift to 6.2.0, Alamofire to 5.4.3, UIScrollView-InfiniteScroll to 1.2.0.

### 1.2.0
- **Add**: `TIKeychainUtils` - Set of helpers for Keychain classes.

Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ github "malcommac/SwiftDate"
github "Alamofire/Alamofire"
github "RxSwiftCommunity/RxAlamofire" ~> 6.1
github "TouchInstinct/TableKit"
github "ReactiveX/RxSwift" ~> 6.0.0
github "ReactiveX/RxSwift" ~> 6.2.0
github "pronebird/UIScrollView-InfiniteScroll"
github "SnapKit/SnapKit" ~> 5.0
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "Alamofire/Alamofire" "5.4.1"
github "ReactiveX/RxSwift" "6.0.0"
github "Alamofire/Alamofire" "5.4.3"
github "ReactiveX/RxSwift" "6.2.0"
github "RxSwiftCommunity/RxAlamofire" "v6.1.1"
github "SnapKit/SnapKit" "5.0.1"
github "TouchInstinct/TableKit" "2.10008.1"
github "malcommac/SwiftDate" "6.3.1"
github "pronebird/UIScrollView-InfiniteScroll" "1.1.0"
github "pronebird/UIScrollView-InfiniteScroll" "1.2.0"
8 changes: 4 additions & 4 deletions LeadKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "LeadKit"
s.version = "1.2.0"
s.version = "1.2.1"
s.summary = "iOS framework with a bunch of tools for rapid development"
s.homepage = "https://github.com/TouchInstinct/LeadKit"
s.license = "Apache License, Version 2.0"
Expand Down Expand Up @@ -107,14 +107,14 @@ Pod::Spec.new do |s|
"Sources/Classes/Controllers/BaseOrientationController.swift"
]

ss.dependency "RxSwift", '~> 6.0.0'
ss.dependency "RxCocoa", '~> 6.0.0'
ss.dependency "RxSwift", '~> 6.2.0'
ss.dependency "RxCocoa", '~> 6.2.0'
ss.dependency "RxAlamofire", '~> 6.1.1'
ss.dependency "SwiftDate", '~> 6'

ss.ios.dependency "TableKit", '~> 2.11'
ss.ios.dependency "SnapKit", '~> 5.0.1'
ss.ios.dependency "UIScrollView-InfiniteScroll", '~> 1.1.0'
ss.ios.dependency "UIScrollView-InfiniteScroll", '~> 1.2.0'
end

s.default_subspec = 'Core'
Expand Down
15 changes: 6 additions & 9 deletions Sources/Classes/Search/BaseSearchViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,14 @@ where ViewModel: BaseSearchViewModel<Item, ItemViewModel> {
open override func bindViews() {
super.bindViews()
viewModel.itemsViewModelsDriver
.withUnretained(self)
.drive(onNext: { owner, viewModels in
owner.handle(itemViewModels: viewModels)
.drive(onNext: { [weak self] viewModels in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а можно захватить self, как тут ReactiveX/RxSwift#2290?

self?.handle(itemViewModels: viewModels)
})
.disposed(by: disposeBag)

Observable.merge(searchResults, resetResults)
.withUnretained(self)
.subscribe(onNext: { owner, state in
owner.handle(searchResultsState: state)
.subscribe(onNext: { [weak self] state in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subscribe(with : ...) ?
и есть ли еще места, где можно заменить подобным образом?

self?.handle(searchResultsState: state)
})
.disposed(by: disposeBag)

Expand Down Expand Up @@ -153,9 +151,8 @@ where ViewModel: BaseSearchViewModel<Item, ItemViewModel> {
open var searchResults: Observable<SearchResultsViewControllerState> {
viewModel.searchResultsDriver
.asObservable()
.withUnretained(self)
.map { owner, viewModels -> SearchResultsViewControllerState in
owner.stateForUpdate(with: viewModels)
.compactMap { [weak self] viewModels in
self?.stateForUpdate(with: viewModels)
}
}

Expand Down
10 changes: 4 additions & 6 deletions Sources/Classes/Search/BaseSearchViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ open class BaseSearchViewModel<Item, ItemViewModel>: GeneralDataLoadingViewModel

open var itemsViewModelsDriver: Driver<[ItemViewModel]> {
loadingResultObservable
.withUnretained(self)
.map { owner, items in
owner.viewModels(from: items)
.map { [weak self] items in
self?.viewModels(from: items)
}
.flatMap { Observable.from(optional: $0) }
.share(replay: 1, scope: .forever)
Expand All @@ -55,9 +54,8 @@ open class BaseSearchViewModel<Item, ItemViewModel>: GeneralDataLoadingViewModel
.flatMapLatest { [weak self] searchText, items -> Observable<ItemsList> in
self?.search(by: searchText, from: items).asObservable() ?? .empty()
}
.withUnretained(self)
.map { owner, items in
owner.viewModels(from: items)
.map { [weak self] items in
self?.viewModels(from: items)
}
.flatMap { Observable.from(optional: $0) }
.share(replay: 1, scope: .forever)
Expand Down
2 changes: 1 addition & 1 deletion TIFoundationUtils/TIFoundationUtils.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'TIFoundationUtils'
s.version = '1.2.0'
s.version = '1.2.1'
s.summary = 'Set of helpers for Foundation framework classes.'
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion TIKeychainUtils/TIKeychainUtils.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'TIKeychainUtils'
s.version = '1.2.0'
s.version = '1.2.1'
s.summary = 'Set of helpers for Keychain classes.'
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion TISwiftUtils/TISwiftUtils.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'TISwiftUtils'
s.version = '1.2.0'
s.version = '1.2.1'
s.summary = 'Bunch of useful helpers for Swift development.'
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion TITableKitUtils/TITableKitUtils.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'TITableKitUtils'
s.version = '1.2.0'
s.version = '1.2.1'
s.summary = 'Set of helpers for TableKit classes.'
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion TITransitions/TITransitions.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'TITransitions'
s.version = '1.2.0'
s.version = '1.2.1'
s.summary = 'Set of custom transitions to present controller. '
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion TIUIElements/TIUIElements.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'TIUIElements'
s.version = '1.2.0'
s.version = '1.2.1'
s.summary = 'Bunch of useful protocols and views.'
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion TIUIKitCore/TIUIKitCore.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'TIUIKitCore'
s.version = '1.2.0'
s.version = '1.2.1'
s.summary = 'Core UI elements: protocols, views and helpers.'
s.homepage = 'https://github.com/TouchInstinct/LeadKit/tree/' + s.version.to_s + '/' + s.name
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down