From a28d835b739af5136841622854b276d07cda7852 Mon Sep 17 00:00:00 2001 From: Cory Wilhite Date: Wed, 7 Aug 2024 12:43:38 -0700 Subject: [PATCH] Mark IGListAdapter, IGListSectionController and IGListBindable as a NS_SWIFT_UI_ACTOR Summary: In order to be ready for Swift 6 and strict concurrency checking, we will mark IGListAdapter, IGListSectionController and IGListBindable as a NS_SWIFT_UI_ACTOR so that swift code that is isolated to the main actor can interact with these instances without needing to wrap in a separate Task or MainActor.run command Differential Revision: D60775816 fbshipit-source-id: 24424bc625d577a1b237207bec29ccec7ef90e82 --- Source/IGListKit/IGListAdapter.h | 1 + Source/IGListKit/IGListAdapterUpdater.h | 1 + Source/IGListKit/IGListBindable.h | 1 + Source/IGListKit/IGListDisplayDelegate.h | 1 + Source/IGListKit/IGListSectionController.h | 1 + 5 files changed, 5 insertions(+) diff --git a/Source/IGListKit/IGListAdapter.h b/Source/IGListKit/IGListAdapter.h index 1d702ec00..1e00d190e 100644 --- a/Source/IGListKit/IGListAdapter.h +++ b/Source/IGListKit/IGListAdapter.h @@ -44,6 +44,7 @@ typedef void (^IGListUpdaterCompletion)(BOOL finished); controllers in a collection view. */ IGLK_SUBCLASSING_RESTRICTED +NS_SWIFT_UI_ACTOR NS_SWIFT_NAME(ListAdapter) @interface IGListAdapter : NSObject diff --git a/Source/IGListKit/IGListAdapterUpdater.h b/Source/IGListKit/IGListAdapterUpdater.h index b0e189f7b..1990120bf 100644 --- a/Source/IGListKit/IGListAdapterUpdater.h +++ b/Source/IGListKit/IGListAdapterUpdater.h @@ -28,6 +28,7 @@ NS_ASSUME_NONNULL_BEGIN `-performUpdateWithCollectionView:fromObjects:toObjects:completion:`. */ IGLK_SUBCLASSING_RESTRICTED +NS_SWIFT_UI_ACTOR NS_SWIFT_NAME(ListAdapterUpdater) @interface IGListAdapterUpdater : NSObject diff --git a/Source/IGListKit/IGListBindable.h b/Source/IGListKit/IGListBindable.h index ec7dd0eba..a4da588e2 100644 --- a/Source/IGListKit/IGListBindable.h +++ b/Source/IGListKit/IGListBindable.h @@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN /** A protocol for cells that configure themselves given a view model. */ +NS_SWIFT_UI_ACTOR NS_SWIFT_NAME(ListBindable) @protocol IGListBindable diff --git a/Source/IGListKit/IGListDisplayDelegate.h b/Source/IGListKit/IGListDisplayDelegate.h index 26325fc38..f7d303aad 100644 --- a/Source/IGListKit/IGListDisplayDelegate.h +++ b/Source/IGListKit/IGListDisplayDelegate.h @@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN /** Implement this protocol to receive display events for a section controller when it is on screen. */ +NS_SWIFT_UI_ACTOR NS_SWIFT_NAME(ListDisplayDelegate) @protocol IGListDisplayDelegate diff --git a/Source/IGListKit/IGListSectionController.h b/Source/IGListKit/IGListSectionController.h index fc783ffed..a6e74ff21 100644 --- a/Source/IGListKit/IGListSectionController.h +++ b/Source/IGListKit/IGListSectionController.h @@ -19,6 +19,7 @@ NS_ASSUME_NONNULL_BEGIN /** The base class for section controllers used in a list. This class is intended to be subclassed. */ +NS_SWIFT_UI_ACTOR NS_SWIFT_NAME(ListSectionController) @interface IGListSectionController : NSObject