Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5837 Disappearing Navigation Bar #5959

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Signal/ConversationView/ConversationViewController+UI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ extension ConversationViewController {

self.title = nil

//HACK: If you look at issue #5837, the navigation title view is disappering. You can confirm this by looking at the view hierarchy; however, the navigation titleview says that its title view is not nil. Setting active breakpoints in this function prevents the bug from happening. I'm confident that this is a UIKit bug. To get around this we simply remove and add the headerview back again. This seems to only happen with iPad

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//HACK: If you look at issue #5837, the navigation title view is disappering. You can confirm this by looking at the view hierarchy; however, the navigation titleview says that its title view is not nil. Setting active breakpoints in this function prevents the bug from happening. I'm confident that this is a UIKit bug. To get around this we simply remove and add the headerview back again. This seems to only happen with iPad
// HACK: If you look at issue #5837, the navigation title view is disappearing. You can confirm this by looking at the view hierarchy; however, the navigation titleview says that its title view is not nil. Setting active breakpoints in this function prevents the bug from happening. I'm confident that this is a UIKit bug. To get around this we simply remove and add the headerview back again. This seems to only happen with iPad

DispatchQueue.main.async { [weak self] in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need [weak self] here ?

self?.navigationItem.titleView = nil
self?.navigationItem.titleView = self?.headerView
}

if thread.isNoteToSelf {
headerView.titleIcon = Theme.iconImage(.official)
headerView.titleIconSize = 16
Expand Down