From 06ff965a70fb2f45a4034fcd2116bff469bf84ab Mon Sep 17 00:00:00 2001 From: Mustapha-Tarek Date: Tue, 19 Nov 2024 15:01:05 +0100 Subject: [PATCH] Update Application/Sources/UI/Controllers/TabBarController.m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Samuel Défago --- Application/Sources/UI/Controllers/TabBarController.m | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Application/Sources/UI/Controllers/TabBarController.m b/Application/Sources/UI/Controllers/TabBarController.m index c9b23c83e..2c510d88f 100755 --- a/Application/Sources/UI/Controllers/TabBarController.m +++ b/Application/Sources/UI/Controllers/TabBarController.m @@ -434,13 +434,9 @@ - (void)updateLayoutAnimated:(BOOL)animated } self.playerHeightConstraint.active = YES; - if (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular) { - self.playerBottomToViewConstraint.active = NO; - self.playerBottomToSafeAreaConstraint.active = YES; - } else { - self.playerBottomToViewConstraint.active = YES; - self.playerBottomToSafeAreaConstraint.active = NO; - } + BOOL isRegular = (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular); + self.playerBottomToViewConstraint.active = ! isRegular; + self.playerBottomToSafeAreaConstraint.active = isRegular; CALayer *miniPlayerLayer = self.miniPlayerView.layer; if (UIAccessibilityIsVoiceOverRunning()) {