Fix home account switch layout crash
This commit is contained in:
@ -35,8 +35,8 @@ enum HomeCollectionLayoutBuilder {
|
||||
/// 构建 Compositional Layout,按当前分区类型返回 section 布局。
|
||||
static func makeLayout(sections: [HomeCollectionSection]) -> UICollectionViewCompositionalLayout {
|
||||
UICollectionViewCompositionalLayout { sectionIndex, environment in
|
||||
guard sectionIndex < sections.count else { return nil }
|
||||
switch sections[sectionIndex] {
|
||||
let section = sectionIndex < sections.count ? sections[sectionIndex] : .commonApps
|
||||
switch section {
|
||||
case .workStatus:
|
||||
return fullWidthSection(height: AppSpacing.formRowHeight)
|
||||
case .locationReport:
|
||||
|
||||
Reference in New Issue
Block a user