Skip to content

Commit

Permalink
Get layoutSection from LayoutProvider (#122)
Browse files Browse the repository at this point in the history
Public the layoutSectionProvider to allow the engineer get the
compositional `layoutSection` from the section controller
  • Loading branch information
CalvinChangCC authored Jun 18, 2024
2 parents 33a220c + 918c9c6 commit 1b380a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import SnapshotTesting
import TestUtilities
import XCTest

@MainActor
final class EmojisSectionControllerSnapshotTests: XCTestCase {
@MainActor
func testDefaultViewModel() {
let sectionController = EmojisSectionController(model: EmojisViewModel())
let container = SectionSnapshotContainer(sectionController: sectionController, width: 375)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public struct CompositionalLayoutProvider {
/// - Parameters:
/// - layoutEnvironment: the environment value for the layout
/// - Returns: The layout for the section
var layoutSectionProvider: (_ layoutEnvironment: NSCollectionLayoutEnvironment) -> NSCollectionLayoutSection
public let layoutSectionProvider: (_ layoutEnvironment: NSCollectionLayoutEnvironment) -> NSCollectionLayoutSection

public init(
layoutSectionProvider: @escaping (any NSCollectionLayoutEnvironment) -> NSCollectionLayoutSection
Expand Down

0 comments on commit 1b380a5

Please sign in to comment.