From ae18abfaf6484cb887b2c17d6a925b957bc58b52 Mon Sep 17 00:00:00 2001 From: yimajo Date: Thu, 29 Aug 2024 18:33:40 +0900 Subject: [PATCH 1/2] Use fully-qualified type for Selectable conformance --- .../FavoriteFeature/FavoriteView.swift | 8 +------ .../Sources/SearchFeature/SearchView.swift | 24 +++---------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/app-ios/Sources/FavoriteFeature/FavoriteView.swift b/app-ios/Sources/FavoriteFeature/FavoriteView.swift index 86e765eca..7917b2891 100644 --- a/app-ios/Sources/FavoriteFeature/FavoriteView.swift +++ b/app-ios/Sources/FavoriteFeature/FavoriteView.swift @@ -83,13 +83,7 @@ public struct FavoriteView: View { } } -#if hasFeature(RetroactiveAttribute) -extension DroidKaigi2024Day: @retroactive Selectable {} -#else -extension DroidKaigi2024Day: Selectable {} -#endif - -extension DroidKaigi2024Day { +extension DroidKaigi2024Day: Model.Selectable { public var id: Self { self } diff --git a/app-ios/Sources/SearchFeature/SearchView.swift b/app-ios/Sources/SearchFeature/SearchView.swift index b7c23c3b3..751a5ef58 100644 --- a/app-ios/Sources/SearchFeature/SearchView.swift +++ b/app-ios/Sources/SearchFeature/SearchView.swift @@ -183,13 +183,7 @@ public struct SearchView: View { } } -#if hasFeature(RetroactiveAttribute) -extension DroidKaigi2024Day: @retroactive Selectable {} -#else -extension DroidKaigi2024Day: Selectable {} -#endif - -extension DroidKaigi2024Day { +extension DroidKaigi2024Day: Model.Selectable { public var id: Self { self } @@ -212,13 +206,7 @@ extension DroidKaigi2024Day { } } -#if hasFeature(RetroactiveAttribute) -extension TimetableSessionType: @retroactive Selectable {} -#else -extension TimetableSessionType: Selectable {} -#endif - -extension TimetableSessionType { +extension TimetableSessionType: Model.Selectable { public var id: Self { self } @@ -228,13 +216,7 @@ extension TimetableSessionType { } } -#if hasFeature(RetroactiveAttribute) -extension Lang: @retroactive Selectable {} -#else -extension Lang: Selectable {} -#endif - -extension Lang { +extension Lang: Model.Selectable { public var id: Self { self } From 2a3034663b3aa91c831fc7acf9746a6a075921d4 Mon Sep 17 00:00:00 2001 From: yimajo Date: Thu, 29 Aug 2024 18:48:52 +0900 Subject: [PATCH 2/2] Remove unnecessary (at)retroactive attribute It was not needed because the type and the extension are declared within the same module. --- app-ios/Sources/Theme/ColorAsset+Sendable.swift | 4 ---- app-ios/Sources/Theme/FontConvertible+Sendable.swift | 4 ---- 2 files changed, 8 deletions(-) diff --git a/app-ios/Sources/Theme/ColorAsset+Sendable.swift b/app-ios/Sources/Theme/ColorAsset+Sendable.swift index 6943a3818..4dd31c040 100644 --- a/app-ios/Sources/Theme/ColorAsset+Sendable.swift +++ b/app-ios/Sources/Theme/ColorAsset+Sendable.swift @@ -1,5 +1 @@ -#if hasFeature(RetroactiveAttribute) -extension ColorAsset: @retroactive @unchecked Sendable {} -#else extension ColorAsset: @unchecked Sendable {} -#endif diff --git a/app-ios/Sources/Theme/FontConvertible+Sendable.swift b/app-ios/Sources/Theme/FontConvertible+Sendable.swift index 4413ea7b5..0536c29c3 100644 --- a/app-ios/Sources/Theme/FontConvertible+Sendable.swift +++ b/app-ios/Sources/Theme/FontConvertible+Sendable.swift @@ -1,5 +1 @@ -#if hasFeature(RetroactiveAttribute) -extension FontConvertible: @retroactive @unchecked Sendable {} -#else extension FontConvertible: @unchecked Sendable {} -#endif