Skip to content

Commit 9afaa9b

Browse files
committed
Pass missing old sections to refresh method. Remove deprecated .swift-version.
1 parent 7ceb922 commit 9afaa9b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Static.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Pod::Spec.new do |spec|
99
spec.author = { 'Venmo' => 'ios@venmo.com', 'Sam Soffes' => 'sam@soff.es' }
1010

1111
spec.platform = :ios, '8.0'
12+
spec.swift_version = '4.2'
1213
spec.frameworks = 'UIKit'
1314
spec.source_files = 'Static/*.{swift,h}'
1415
end

Static/DataSource.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class DataSource: NSObject {
2828
public var sections: [Section] {
2929
didSet {
3030
assert(Thread.isMainThread, "You must access Static.DataSource from the main thread.")
31-
refresh()
31+
refresh(oldSections: oldValue)
3232
}
3333
}
3434

@@ -101,8 +101,8 @@ public class DataSource: NSObject {
101101
refresh()
102102
}
103103

104-
private func refresh() {
105-
refreshTableSections()
104+
private func refresh(oldSections: [Section]? = nil) {
105+
refreshTableSections(oldSections: oldSections)
106106
refreshRegisteredCells()
107107
}
108108

0 commit comments

Comments
 (0)