Compare commits
No commits in common. "afcec24f868a420f08b1457c91a25a17b55cdc76" and "cced930549591f6ddd922e6f0c6880ab914e8293" have entirely different histories.
afcec24f86
...
cced930549
|
@ -8,7 +8,7 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
public protocol GalleryContentViewControllerContainer: AnyObject {
|
public protocol GalleryContentViewControllerContainer {
|
||||||
var galleryControlsVisible: Bool { get }
|
var galleryControlsVisible: Bool { get }
|
||||||
|
|
||||||
func setGalleryContentLoading(_ loading: Bool)
|
func setGalleryContentLoading(_ loading: Bool)
|
||||||
|
|
|
@ -10,7 +10,7 @@ import UIKit
|
||||||
@MainActor
|
@MainActor
|
||||||
class GalleryDismissInteraction: NSObject {
|
class GalleryDismissInteraction: NSObject {
|
||||||
|
|
||||||
private unowned let viewController: GalleryViewController
|
private let viewController: GalleryViewController
|
||||||
|
|
||||||
private var content: GalleryContentViewController?
|
private var content: GalleryContentViewController?
|
||||||
private var origContentFrameInGallery: CGRect?
|
private var origContentFrameInGallery: CGRect?
|
||||||
|
|
|
@ -52,12 +52,6 @@ class AccountFollowsListViewController: UIViewController, CollectionViewControll
|
||||||
config.topSeparatorVisibility = .hidden
|
config.topSeparatorVisibility = .hidden
|
||||||
config.bottomSeparatorVisibility = .hidden
|
config.bottomSeparatorVisibility = .hidden
|
||||||
}
|
}
|
||||||
if config.topSeparatorInsets != .zero {
|
|
||||||
config.topSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
|
||||||
}
|
|
||||||
if config.bottomSeparatorInsets != .zero {
|
|
||||||
config.bottomSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
|
||||||
}
|
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
let layout = UICollectionViewCompositionalLayout { sectionIndex, environment in
|
let layout = UICollectionViewCompositionalLayout { sectionIndex, environment in
|
||||||
|
|
|
@ -33,8 +33,6 @@ class AccountListViewController: UIViewController, CollectionViewController {
|
||||||
override func loadView() {
|
override func loadView() {
|
||||||
var config = UICollectionLayoutListConfiguration(appearance: .grouped)
|
var config = UICollectionLayoutListConfiguration(appearance: .grouped)
|
||||||
config.backgroundColor = .appGroupedBackground
|
config.backgroundColor = .appGroupedBackground
|
||||||
config.separatorConfiguration.topSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
|
||||||
config.separatorConfiguration.bottomSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
|
||||||
let layout = UICollectionViewCompositionalLayout { sectionIndex, environment in
|
let layout = UICollectionViewCompositionalLayout { sectionIndex, environment in
|
||||||
let section = NSCollectionLayoutSection.list(using: config, layoutEnvironment: environment)
|
let section = NSCollectionLayoutSection.list(using: config, layoutEnvironment: environment)
|
||||||
section.readableContentInset(in: environment)
|
section.readableContentInset(in: environment)
|
||||||
|
|
|
@ -70,7 +70,7 @@ class FallbackGalleryNavigationController: UINavigationController, GalleryConten
|
||||||
|
|
||||||
// MARK: GalleryContentViewController
|
// MARK: GalleryContentViewController
|
||||||
|
|
||||||
weak var container: (any GalleryVC.GalleryContentViewControllerContainer)?
|
var container: (any GalleryVC.GalleryContentViewControllerContainer)?
|
||||||
|
|
||||||
var contentSize: CGSize {
|
var contentSize: CGSize {
|
||||||
.zero
|
.zero
|
||||||
|
|
|
@ -59,7 +59,7 @@ class GifvGalleryContentViewController: UIViewController, GalleryContentViewCont
|
||||||
|
|
||||||
// MARK: GalleryContentViewController
|
// MARK: GalleryContentViewController
|
||||||
|
|
||||||
weak var container: (any GalleryVC.GalleryContentViewControllerContainer)?
|
var container: (any GalleryVC.GalleryContentViewControllerContainer)?
|
||||||
|
|
||||||
var contentSize: CGSize {
|
var contentSize: CGSize {
|
||||||
controller.item.presentationSize
|
controller.item.presentationSize
|
||||||
|
|
|
@ -114,7 +114,7 @@ class ImageGalleryContentViewController: UIViewController, GalleryContentViewCon
|
||||||
|
|
||||||
// MARK: GalleryContentViewController
|
// MARK: GalleryContentViewController
|
||||||
|
|
||||||
weak var container: (any GalleryVC.GalleryContentViewControllerContainer)?
|
var container: (any GalleryVC.GalleryContentViewControllerContainer)?
|
||||||
|
|
||||||
var contentSize: CGSize {
|
var contentSize: CGSize {
|
||||||
image.size
|
image.size
|
||||||
|
|
|
@ -13,7 +13,7 @@ class LoadingGalleryContentViewController: UIViewController, GalleryContentViewC
|
||||||
private let provider: () async -> (any GalleryContentViewController)?
|
private let provider: () async -> (any GalleryContentViewController)?
|
||||||
private var wrapped: (any GalleryContentViewController)!
|
private var wrapped: (any GalleryContentViewController)!
|
||||||
|
|
||||||
weak var container: GalleryContentViewControllerContainer?
|
var container: GalleryContentViewControllerContainer?
|
||||||
|
|
||||||
var contentSize: CGSize {
|
var contentSize: CGSize {
|
||||||
wrapped?.contentSize ?? .zero
|
wrapped?.contentSize ?? .zero
|
||||||
|
|
|
@ -132,7 +132,7 @@ class VideoGalleryContentViewController: UIViewController, GalleryContentViewCon
|
||||||
|
|
||||||
// MARK: GalleryContentViewController
|
// MARK: GalleryContentViewController
|
||||||
|
|
||||||
weak var container: (any GalleryVC.GalleryContentViewControllerContainer)?
|
var container: (any GalleryVC.GalleryContentViewControllerContainer)?
|
||||||
|
|
||||||
var contentSize: CGSize {
|
var contentSize: CGSize {
|
||||||
item.presentationSize
|
item.presentationSize
|
||||||
|
|
|
@ -29,7 +29,6 @@ class GifvController {
|
||||||
self.isGrayscale = Preferences.shared.grayscaleImages
|
self.isGrayscale = Preferences.shared.grayscaleImages
|
||||||
|
|
||||||
player.isMuted = true
|
player.isMuted = true
|
||||||
player.preventsDisplaySleepDuringVideoPlayback = false
|
|
||||||
|
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(restartItem), name: .AVPlayerItemDidPlayToEndTime, object: item)
|
NotificationCenter.default.addObserver(self, selector: #selector(restartItem), name: .AVPlayerItemDidPlayToEndTime, object: item)
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(preferencesChanged), name: .preferencesChanged, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(preferencesChanged), name: .preferencesChanged, object: nil)
|
||||||
|
|
Loading…
Reference in New Issue