Skip to content

Commit 6972981

Browse files
authored
Merge pull request #234 from surfstudio/hotfix/replace_hardcoded_animation_parameter
Hotfix/replace hardcoded animation parameter
2 parents 8f1103b + 9e2b85d commit 6972981

File tree

8 files changed

+23
-16
lines changed

8 files changed

+23
-16
lines changed

Example/targets/template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ targetTemplates:
3636
settings:
3737
base:
3838
PRODUCT_BUNDLE_IDENTIFIER: ${bundle_id}
39-
MARKETING_VERSION: "7.3.5"
39+
MARKETING_VERSION: "7.3.6"
4040
CURRENT_PROJECT_VERSION: 0
4141
VERSIONING_SYSTEM: "apple-generic"
4242
DEBUG_INFORMATION_FORMAT: dwarf-with-dsym

ReactiveDataDisplayManager.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "ReactiveDataDisplayManager"
3-
s.version = "7.3.5"
3+
s.version = "7.3.6"
44
s.summary = "Library with custom events and reusable adapter for scrollable UI Collections"
55
s.homepage = "https://github.com/surfstudio/ReactiveDataDisplayManager"
66
s.license = "MIT"

Source/Collection/Animator/CollectionSafeAnimator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public final class CollectionSafeAnimator: Animator<UICollectionView> {
1818
self.generatorsProvider = generatorsProvider
1919
}
2020

21-
public override func performAnimated(in collection: UICollectionView, operation: Operation?) {
21+
override func perform(in collection: UICollectionView, animated: Bool, operation: Animator<UICollectionView>.Operation?) {
2222
if operation == nil {
2323
let numberOfSectionsAreEqual = collection.numberOfSections == generatorsProvider?.sections.count
2424
guard numberOfSectionsAreEqual else {
@@ -32,7 +32,7 @@ public final class CollectionSafeAnimator: Animator<UICollectionView> {
3232
return
3333
}
3434
}
35-
baseAnimator.performAnimated(in: collection, operation: operation)
35+
baseAnimator.perform(in: collection, animated: animated, operation: operation)
3636
}
3737

3838
}

Source/Collection/DataSource/BaseCollectionDataSource.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,15 @@ private extension BaseCollectionDataSource {
146146
guard let expandable = cell as? ExpandableItem else {
147147
return
148148
}
149-
expandable.onHeightChanged += { [weak self, weak collectionView] _ in
150-
guard let collectionView = collectionView else {
149+
expandable.onHeightChanged += { [weak self, weak expandable, weak collectionView] _ in
150+
guard let collectionView = collectionView,
151+
let animated = expandable?.animatedExpandable else {
151152
return
152153
}
153-
self?.animator?.perform(in: collectionView, animated: true, operation: nil)
154+
155+
self?.animator?.perform(in: collectionView,
156+
animated: animated,
157+
operation: nil)
154158
}
155159
}
156160

Source/Common/QueuedAnimator.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public final class QueuedAnimator<Collection: UIView>: Animator<Collection> {
2020
self.debouncer = .init(queue: .global(qos: .userInitiated), delay: debounceTime)
2121
}
2222

23-
override func performAnimated(in collection: Collection, operation: Animator<Collection>.Operation?) {
23+
override func perform(in collection: Collection, animated: Bool, operation: Animator<Collection>.Operation?) {
2424
if operation == nil {
2525
// debounce
2626
debouncer.run { [weak baseAnimator, weak collection] in
@@ -29,11 +29,11 @@ public final class QueuedAnimator<Collection: UIView>: Animator<Collection> {
2929
}
3030
// waiting for main thread available
3131
DispatchQueue.main.async {
32-
animator.performAnimated(in: collection, operation: operation)
32+
animator.perform(in: collection, animated: animated, operation: operation)
3333
}
3434
}
3535
} else {
36-
baseAnimator.performAnimated(in: collection, operation: operation)
36+
baseAnimator.perform(in: collection, animated: animated, operation: operation)
3737
}
3838
}
3939
}

Source/Table/Animator/TableSafeAnimator.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public final class TableSafeAnimator: Animator<UITableView> {
1818
self.generatorsProvider = generatorsProvider
1919
}
2020

21-
public override func performAnimated(in collection: UITableView, operation: Operation?) {
21+
override func perform(in collection: UITableView, animated: Bool, operation: Animator<UITableView>.Operation?) {
2222
if operation == nil {
2323
let numberOfSectionsAreEqual = collection.numberOfSections == generatorsProvider?.sections.count
2424
guard numberOfSectionsAreEqual else {
@@ -32,7 +32,7 @@ public final class TableSafeAnimator: Animator<UITableView> {
3232
return
3333
}
3434
}
35-
baseAnimator.performAnimated(in: collection, operation: operation)
35+
baseAnimator.perform(in: collection, animated: animated, operation: operation)
3636
}
3737

3838
}

Source/Table/DataSource/BaseTableDataSource.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,14 @@ private extension BaseTableDataSource {
125125
guard let expandable = cell as? ExpandableItem else {
126126
return
127127
}
128-
expandable.onHeightChanged += { [weak self, weak tableView] _ in
129-
guard let tableView = tableView else {
128+
expandable.onHeightChanged += { [weak self, weak expandable, weak tableView] _ in
129+
guard let tableView = tableView,
130+
let animated = expandable?.animatedExpandable else {
130131
return
131132
}
132-
self?.animator?.perform(in: tableView, animated: expandable.animatedExpandable, operation: nil)
133+
self?.animator?.perform(in: tableView,
134+
animated: animated,
135+
operation: nil)
133136
}
134137
}
135138

project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ targets:
3636
settings:
3737
base:
3838
PRODUCT_BUNDLE_IDENTIFIER: ru.surfstudio.rddm
39-
MARKETING_VERSION: "7.3.5"
39+
MARKETING_VERSION: "7.3.6"
4040
CURRENT_PROJECT_VERSION: 0
4141
VERSIONING_SYSTEM: "apple-generic"
4242
DEBUG_INFORMATION_FORMAT: dwarf-with-dsym

0 commit comments

Comments
 (0)