Skip to content

Commit 3b1d139

Browse files
authored
Merge pull request #200 from P24L/fix/savefeed-init
Fix: Add public initializers for SavedFeed and SavedFeedPreferencesVe…
2 parents e4a6d22 + 391dd43 commit 3b1d139

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Sources/ATProtoKit/Models/Lexicons/app.bsky/Actor/AppBskyActorDefs.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,20 @@ extension AppBskyLexicon.Actor {
948948
/// Indicated whether the saved feed generator is pinned.
949949
public let isPinned: Bool
950950

951+
/// Creates a new saved feed instance.
952+
///
953+
/// - Parameters:
954+
/// - feedID: The ID for the saved feed.
955+
/// - feedType: The type of feed generator.
956+
/// - value: The value of the saved feed generator.
957+
/// - isPinned: Indicates whether the saved feed generator is pinned.
958+
public init(feedID: String, feedType: FeedType, value: String, isPinned: Bool) {
959+
self.feedID = feedID
960+
self.feedType = feedType
961+
self.value = value
962+
self.isPinned = isPinned
963+
}
964+
951965
/// The type of feed generator.
952966
///
953967
/// This is usually referring to the location of the feed in context to the
@@ -989,6 +1003,13 @@ extension AppBskyLexicon.Actor {
9891003
/// An array of saved feed generators.
9901004
public let items: [SavedFeed]
9911005

1006+
/// Creates a new saved feed preferences version 2 instance.
1007+
///
1008+
/// - Parameter items: An array of saved feed generators.
1009+
public init(items: [SavedFeed]) {
1010+
self.items = items
1011+
}
1012+
9921013
enum CodingKeys: String, CodingKey {
9931014
case type = "$type"
9941015
case items

0 commit comments

Comments
 (0)