From e6e5554edf407260a94c2932dc0b12ba07b65858 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 15 Aug 2021 19:29:26 -0400 Subject: [PATCH] Fix fast account switcher animation weirdness when 1 account only --- .../FastAccountSwitcherViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.swift b/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.swift index 39d6fcba..b3f4631f 100644 --- a/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.swift +++ b/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.swift @@ -73,12 +73,12 @@ class FastAccountSwitcherViewController: UIViewController { accountView.alpha = 0 accountView.transform = CGAffineTransform(scaleX: 1.2, y: 1.2) - UIView.addKeyframe(withRelativeStartTime: relStart, relativeDuration: relDuration) { + UIView.addKeyframe(withRelativeStartTime: relStart, relativeDuration: relDuration / 2) { accountView.alpha = 1 accountView.transform = CGAffineTransform(scaleX: 0.9, y: 0.9) } - UIView.addKeyframe(withRelativeStartTime: relStart + relDuration, relativeDuration: relDuration) { + UIView.addKeyframe(withRelativeStartTime: relStart + relDuration / 2, relativeDuration: relDuration / 2) { accountView.transform = .identity } }