Skip to content

Commit

Permalink
Always run message bar UI update on main thread
Browse files Browse the repository at this point in the history
  • Loading branch information
mathebox committed Jan 23, 2024
1 parent b2d98f1 commit 3289066
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions iOS/XikoloTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
Expand Down

0 comments on commit 3289066

Please sign in to comment.