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

9.1.1 - Fix Potential Internal Inconsistency #49

Merged
merged 3 commits into from
May 26, 2022
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 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build-and-test:
macos:
xcode: 11.0.0
xcode: 12.5.1
working_directory: /Users/distiller/project
environment:
FL_OUTPUT_DIR: /Users/distiller/project/Example/fastlane/test_output
Expand All @@ -27,4 +27,4 @@ workflows:
version: 2
build-test-adhoc:
jobs:
- build-and-test
- build-and-test
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- Sections (0.8.0)
- SplitScreenScanner (9.0.2):
- SplitScreenScanner (9.1.1):
- Sections
- SwiftLint (0.34.0)

Expand All @@ -20,9 +20,9 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Sections: efc268a207d0e7afba82d2a0efd6cdf61872b5d4
SplitScreenScanner: 48ddf2c2db8bb133a0b7991e29fd9e3fb0546c05
SplitScreenScanner: a4e8c1c708f5434b3d4374218463ddd7d81c7774
SwiftLint: 79d48a17c6565dc286c37efb8322c7b450f95c67

PODFILE CHECKSUM: e3b551128f802187ddddf037b42e5f79c866fb2a

COCOAPODS: 1.11.2
COCOAPODS: 1.8.4
2 changes: 1 addition & 1 deletion SplitScreenScanner.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'SplitScreenScanner'
s.version = '9.1.0'
s.version = '9.1.1'
s.summary = 'Swift library for scanning barcodes with half the screen devoted to scan history'

# This description is used to generate tags and improve search results.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import UIKit
class ScanHistoryTableViewController: UITableViewController {
var viewModel: ScanHistoryViewModel!

private var pendingInsertions: [IndexPath] = []

override func viewDidLoad() {
super.viewDidLoad()

Expand All @@ -20,8 +22,13 @@ class ScanHistoryTableViewController: UITableViewController {
}

viewModel.insertRowObserver = { [weak self] indexPath in
self?.pendingInsertions.insert(indexPath, at: 0)
DispatchQueue.main.async {
self?.tableView.insertRows(at: [indexPath], with: .left)
guard let pendingInsertions = self?.pendingInsertions, !pendingInsertions.isEmpty else {
return
}
self?.tableView.insertRows(at: pendingInsertions, with: .left)
self?.pendingInsertions = []
}
}

Expand Down