From 87dd136e68ed86cddde1f7cbed09f710e9fd9e00 Mon Sep 17 00:00:00 2001 From: Andrea Bellotto Date: Tue, 28 Jul 2020 17:04:15 +0200 Subject: [PATCH 1/3] added another control to check if there is the correct element to get context --- Sources/Owl/Table/TableDirector.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Owl/Table/TableDirector.swift b/Sources/Owl/Table/TableDirector.swift index 48d4ddd..af009af 100644 --- a/Sources/Owl/Table/TableDirector.swift +++ b/Sources/Owl/Table/TableDirector.swift @@ -678,7 +678,8 @@ extension TableDirector: UITableViewDataSource, UITableViewDelegate { public func tableView(_ tableView: UITableView, didEndEditingRowAt indexPath: IndexPath?) { guard let indexPath = indexPath else { return } - if indexPath.row >= tableView.numberOfRows(inSection: indexPath.section) { + if indexPath.row >= tableView.numberOfRows(inSection: indexPath.section) || + indexPath.row >= sections[indexPath.section].elements.count { return } let (model, adapter) = context(forItemAt: indexPath) From d18a75db53c3b23e43bcdf3a52e6d48b781a8e9a Mon Sep 17 00:00:00 2001 From: Andrea Bellotto Date: Tue, 28 Jul 2020 17:21:54 +0200 Subject: [PATCH 2/3] added check on also section count --- Sources/Owl/Table/TableDirector.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Owl/Table/TableDirector.swift b/Sources/Owl/Table/TableDirector.swift index af009af..453a677 100644 --- a/Sources/Owl/Table/TableDirector.swift +++ b/Sources/Owl/Table/TableDirector.swift @@ -679,7 +679,8 @@ extension TableDirector: UITableViewDataSource, UITableViewDelegate { public func tableView(_ tableView: UITableView, didEndEditingRowAt indexPath: IndexPath?) { guard let indexPath = indexPath else { return } if indexPath.row >= tableView.numberOfRows(inSection: indexPath.section) || - indexPath.row >= sections[indexPath.section].elements.count { + indexPath.section >= sections.count || + indexPath.row >= sections[indexPath.section].elements.count { return } let (model, adapter) = context(forItemAt: indexPath) From 9c1e3cb90b3a201c1edc619ef15c94d0edff76c9 Mon Sep 17 00:00:00 2001 From: Daniele Margutti Date: Tue, 4 Aug 2020 09:00:15 +0200 Subject: [PATCH 3/3] Bump to 1.1.3 --- OwlKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OwlKit.podspec b/OwlKit.podspec index 939fc0c..733c017 100644 --- a/OwlKit.podspec +++ b/OwlKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "OwlKit" - s.version = "1.1.2" + s.version = "1.1.3" s.summary = "A declarative type-safe framework for building fast and flexible list with Tables & Collections" s.description = <<-DESC Owl offers a data-driven declarative approach for building fast & flexible list in iOS. It supports both UICollectionView & UITableView; UIStackView is on the way!.