From 8660ff24ec0153a956e78f41966e45b47a7719fb Mon Sep 17 00:00:00 2001 From: Nikolay Fiantsev Date: Tue, 7 Sep 2021 13:08:34 +0300 Subject: [PATCH] Provide performsFirstActionWithFullSwipe with TrailingSwipeableType protocol --- DataDrivenRxDatasources.podspec | 2 +- .../DataDrivenRxDatasources/SectionModelExtensions.swift | 7 +++++++ .../DataDrivenRxDatasources/TableView/RxTableView.swift | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/DataDrivenRxDatasources.podspec b/DataDrivenRxDatasources.podspec index 5464d05..fb6366c 100644 --- a/DataDrivenRxDatasources.podspec +++ b/DataDrivenRxDatasources.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "DataDrivenRxDatasources" - s.version = "3.2.1" + s.version = "3.2.2" s.summary = "MVVM abstraction boilerplate code over RxDataSources." s.description = <<-DESC DataDrivenRxDatasources - MVVM abstraction boilerplate code over RxDataSources. diff --git a/Sources/DataDrivenRxDatasources/SectionModelExtensions.swift b/Sources/DataDrivenRxDatasources/SectionModelExtensions.swift index 8302734..2557a21 100644 --- a/Sources/DataDrivenRxDatasources/SectionModelExtensions.swift +++ b/Sources/DataDrivenRxDatasources/SectionModelExtensions.swift @@ -65,6 +65,13 @@ public protocol DeletableType { // Protocol for viewModel that provide and handles trailing swipe actions public protocol TrailingSwipeableType { var trailingSwipeActions: [SwipeAction] { get } + var performsFirstActionWithFullSwipe: Bool { get } +} + +extension TrailingSwipeableType { + public var performsFirstActionWithFullSwipe: Bool { + return true + } } // Protocol for UITableViewCell to update constraints and redraw cell diff --git a/Sources/DataDrivenRxDatasources/TableView/RxTableView.swift b/Sources/DataDrivenRxDatasources/TableView/RxTableView.swift index 845e0bd..31b9e81 100644 --- a/Sources/DataDrivenRxDatasources/TableView/RxTableView.swift +++ b/Sources/DataDrivenRxDatasources/TableView/RxTableView.swift @@ -229,7 +229,9 @@ private final class TableViewControllerDelegateProxy UIView? {