From 32890663ff11e686196922d07d095014031d5bc0 Mon Sep 17 00:00:00 2001 From: Max Bothe Date: Mon, 22 Jan 2024 13:02:30 +0100 Subject: [PATCH] Always run message bar UI update on main thread --- iOS/XikoloTabBarController.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/iOS/XikoloTabBarController.swift b/iOS/XikoloTabBarController.swift index 4a91ac7e8..7b8f34ef4 100644 --- a/iOS/XikoloTabBarController.swift +++ b/iOS/XikoloTabBarController.swift @@ -105,10 +105,11 @@ class XikoloTabBarController: UITabBarController { } logger.info("Update app state from %@ to %@", String(describing: self.status), String(describing: newValue)) - let animated = self.status != .standard - UIView.animate(withDuration: defaultAnimationDuration(animated)) { - self._status = newValue - self.updateMessageViewAppearance() + + self._status = newValue + + DispatchQueue.main.async { [weak self] in + self?.updateMessageViewAppearance() } } }