From ecf718378e33238ee58cc7061ea9f411703dfa2c Mon Sep 17 00:00:00 2001 From: Daniel Langh Date: Wed, 7 Jul 2021 11:56:55 +0200 Subject: [PATCH 1/3] updated function builder to use @resultBuilder, fixed compiler warning --- Sources/ExpandableCollectionViewKit/Utils/ExpandableItems.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ExpandableCollectionViewKit/Utils/ExpandableItems.swift b/Sources/ExpandableCollectionViewKit/Utils/ExpandableItems.swift index c1eaef4..8d6a316 100644 --- a/Sources/ExpandableCollectionViewKit/Utils/ExpandableItems.swift +++ b/Sources/ExpandableCollectionViewKit/Utils/ExpandableItems.swift @@ -12,7 +12,7 @@ public struct ExpandableItems { var items: [ExpandableItem] = [] } -@_functionBuilder +@resultBuilder public struct ExpandableItemBuilder { public static func buildBlock(_ item: ExpandableItem) -> ExpandableItem { From 0192ae77401ef511489ad8258242fa412e392069 Mon Sep 17 00:00:00 2001 From: Daniel Langh Date: Wed, 7 Jul 2021 11:57:15 +0200 Subject: [PATCH 2/3] added support for ExpandableItems in function builder --- .../ExpandableCollectionViewKit/Utils/ExpandableItems.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/ExpandableCollectionViewKit/Utils/ExpandableItems.swift b/Sources/ExpandableCollectionViewKit/Utils/ExpandableItems.swift index 8d6a316..f156827 100644 --- a/Sources/ExpandableCollectionViewKit/Utils/ExpandableItems.swift +++ b/Sources/ExpandableCollectionViewKit/Utils/ExpandableItems.swift @@ -22,5 +22,9 @@ public struct ExpandableItemBuilder { public static func buildBlock(_ subitems: ExpandableItem...) -> ExpandableItems { .init(items: subitems) } + + public static func buildBlock(_ items: ExpandableItems) -> ExpandableItems { + items + } } From d5d0fdbbfda73206d807085ca061328b0927bd4f Mon Sep 17 00:00:00 2001 From: Astemir Eleev Date: Sun, 18 Jul 2021 16:33:50 +0300 Subject: [PATCH 3/3] Updated badge and date --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7b4ed72..c4f584d 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ [![Build](https://github.com/jvirus/expandable-collection-view-kit/workflows/Build/badge.svg)]() [![Platform](https://img.shields.io/badge/Platform-iOS_13-yellow.svg)]() [![Platform](https://img.shields.io/badge/Platform-iPadOS_13-darkyellow.svg)]() -[![Language](https://img.shields.io/badge/Language-Swift_5.1-orange.svg)]() +[![Language](https://img.shields.io/badge/Language-Swift_5.3-orange.svg)]() [![SPM](https://img.shields.io/badge/SPM-Supported-red.svg)]() [![License](https://img.shields.io/badge/License-MIT-blue.svg)]() -**Last Update: 04/February/2020.** +**Last Update: 18/July/2021.** ![](cover-expandable-view.png)