Compare commits
4 Commits
5620b6ab78
...
06ba758309
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 06ba758309 | |
Shadowfacts | 2c56902389 | |
Shadowfacts | cb3fd43dbd | |
Shadowfacts | 3d15759fb9 |
|
@ -40,6 +40,7 @@ class AttachmentThumbnailController: ViewController {
|
||||||
case .video, .gifv:
|
case .video, .gifv:
|
||||||
let asset = AVURLAsset(url: url)
|
let asset = AVURLAsset(url: url)
|
||||||
let imageGenerator = AVAssetImageGenerator(asset: asset)
|
let imageGenerator = AVAssetImageGenerator(asset: asset)
|
||||||
|
imageGenerator.appliesPreferredTrackTransform = true
|
||||||
#if os(visionOS)
|
#if os(visionOS)
|
||||||
#warning("Use async AVAssetImageGenerator.image(at:)")
|
#warning("Use async AVAssetImageGenerator.image(at:)")
|
||||||
#else
|
#else
|
||||||
|
@ -91,6 +92,7 @@ class AttachmentThumbnailController: ViewController {
|
||||||
if type.conforms(to: .movie) {
|
if type.conforms(to: .movie) {
|
||||||
let asset = AVURLAsset(url: url)
|
let asset = AVURLAsset(url: url)
|
||||||
let imageGenerator = AVAssetImageGenerator(asset: asset)
|
let imageGenerator = AVAssetImageGenerator(asset: asset)
|
||||||
|
imageGenerator.appliesPreferredTrackTransform = true
|
||||||
#if os(visionOS)
|
#if os(visionOS)
|
||||||
#warning("Use async AVAssetImageGenerator.image(at:)")
|
#warning("Use async AVAssetImageGenerator.image(at:)")
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -247,6 +247,9 @@ class MainSceneDelegate: UIResponder, UIWindowSceneDelegate, TuskerSceneDelegate
|
||||||
LogoutService(accountInfo: account).run()
|
LogoutService(accountInfo: account).run()
|
||||||
if UserAccountsManager.shared.onboardingComplete {
|
if UserAccountsManager.shared.onboardingComplete {
|
||||||
activateAccount(UserAccountsManager.shared.accounts.first!, animated: false)
|
activateAccount(UserAccountsManager.shared.accounts.first!, animated: false)
|
||||||
|
if let container = window?.rootViewController as? AccountSwitchingContainerViewController {
|
||||||
|
container.removeAccount(account)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
window!.rootViewController = createOnboardingUI()
|
window!.rootViewController = createOnboardingUI()
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,10 +265,8 @@ private class VideoScrubbingControl: UIControl {
|
||||||
|
|
||||||
private func updateFillLayerMask() {
|
private func updateFillLayerMask() {
|
||||||
// I don't know where this animation is coming from
|
// I don't know where this animation is coming from
|
||||||
CATransaction.begin()
|
|
||||||
CATransaction.setDisableActions(true)
|
|
||||||
fillMaskLayer.frame = CGRect(x: 0, y: 0, width: fractionComplete * bounds.width, height: 8)
|
fillMaskLayer.frame = CGRect(x: 0, y: 0, width: fractionComplete * bounds.width, height: 8)
|
||||||
CATransaction.commit()
|
fillMaskLayer.removeAllAnimations()
|
||||||
}
|
}
|
||||||
|
|
||||||
override func beginTracking(_ touch: UITouch, with event: UIEvent?) -> Bool {
|
override func beginTracking(_ touch: UITouch, with event: UIEvent?) -> Bool {
|
||||||
|
|
|
@ -49,6 +49,10 @@ class AccountSwitchingContainerViewController: UIViewController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func removeAccount(_ account: UserAccountInfo) {
|
||||||
|
viewControllers.removeValue(forKey: account.id)
|
||||||
|
}
|
||||||
|
|
||||||
func setRoot(_ newRootProvider: () -> AccountSwitchableViewController, for account: UserAccountInfo, animating direction: AnimationDirection) {
|
func setRoot(_ newRootProvider: () -> AccountSwitchableViewController, for account: UserAccountInfo, animating direction: AnimationDirection) {
|
||||||
let oldRoot = self.root
|
let oldRoot = self.root
|
||||||
if direction == .none {
|
if direction == .none {
|
||||||
|
|
Loading…
Reference in New Issue