Compare commits

..

No commits in common. "01cf597b5d305c74e9e63c82f7bb68c3b2de8a63" and "f4b51c06c1107cd8149a8e07a0f652ac6816ee3a" have entirely different histories.

2 changed files with 9 additions and 16 deletions

View File

@ -454,7 +454,6 @@ extension NewMainTabBarViewController {
extension NewMainTabBarViewController: UITabBarControllerDelegate { extension NewMainTabBarViewController: UITabBarControllerDelegate {
func tabBarController(_ tabBarController: UITabBarController, shouldSelectTab tab: UITab) -> Bool { func tabBarController(_ tabBarController: UITabBarController, shouldSelectTab tab: UITab) -> Bool {
if tab.identifier == Tab.compose.rawValue { if tab.identifier == Tab.compose.rawValue {
if #unavailable(iOS 18.1) {
let currentTab = selectedTab let currentTab = selectedTab
// returning false for shouldSelectTab doesn't prevent the UITabBar from being updated (FB14857254) // returning false for shouldSelectTab doesn't prevent the UITabBar from being updated (FB14857254)
// returning false and then setting selectedTab=tab and selectedTab=currentTab seems to leave things in a bad state (currentTab's VC is on screen but in the disappeared state) // returning false and then setting selectedTab=tab and selectedTab=currentTab seems to leave things in a bad state (currentTab's VC is on screen but in the disappeared state)
@ -464,10 +463,6 @@ extension NewMainTabBarViewController: UITabBarControllerDelegate {
} }
compose(editing: nil) compose(editing: nil)
return true return true
} else {
compose(editing: nil)
return false
}
} else if let selectedTab, } else if let selectedTab,
selectedTab == tab, selectedTab == tab,
let nav = selectedViewController as? any NavigationControllerProtocol { let nav = selectedViewController as? any NavigationControllerProtocol {

View File

@ -30,9 +30,7 @@ class AccountDisplayAndUserNameLabel: EmojiLabel {
private func makeAttributedText(state: State) -> NSAttributedString { private func makeAttributedText(state: State) -> NSAttributedString {
let s = NSMutableAttributedString() let s = NSMutableAttributedString()
// U+2068 FIRST-STRONG ISOLATE and U+2069 POP DIRECTIONAL ISOLATE s.append(NSAttributedString(string: state.displayName, attributes: [
// to prevent bidi text in the display name influencing the username
s.append(NSAttributedString(string: "\u{2068}\(state.displayName)\u{2069}", attributes: [
.font: UIFont(descriptor: baseFont.addingAttributes([ .font: UIFont(descriptor: baseFont.addingAttributes([
.traits: [ .traits: [
UIFontDescriptor.TraitKey.weight: UIFont.Weight.semibold.rawValue, UIFontDescriptor.TraitKey.weight: UIFont.Weight.semibold.rawValue,