Compare commits

..

4 Commits

4 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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()
} }

View File

@ -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 {

View File

@ -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 {