Skip to content

Commit

Permalink
crash fix iOS 15
Browse files Browse the repository at this point in the history
  • Loading branch information
SynthesOne committed Jul 15, 2024
1 parent f6a4fbf commit 6e3e1c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/General/UILayer/MPViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ final class MPViewController: UIViewController {
configuration.interSectionSpacing = UIScreenPixel
let layout = UICollectionViewCompositionalLayout(sectionProvider: { [weak self] (sectionIndex: Int, environment: NSCollectionLayoutEnvironment) -> NSCollectionLayoutSection? in
guard let strongSelf = self else { return nil }
let section = strongSelf.showedSections[sectionIndex]
let section = strongSelf.showedSections[optional: sectionIndex]
var columnCount = 3
if UIApplication.shared.mp.scene?.interfaceOrientation.isLandscape == true {
columnCount += 2
Expand Down Expand Up @@ -396,6 +396,9 @@ final class MPViewController: UIViewController {
section.contentInsets = .zero

return section

default:
return nil
}

}, configuration: configuration)
Expand Down

0 comments on commit 6e3e1c0

Please sign in to comment.