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

Bug: Open in new tab doesn't show infomation #15825

Closed
Josh65-2201 opened this issue Jul 19, 2024 · 6 comments · Fixed by #15898
Closed

Bug: Open in new tab doesn't show infomation #15825

Josh65-2201 opened this issue Jul 19, 2024 · 6 comments · Fixed by #15898

Comments

@Josh65-2201
Copy link
Member

Description

The icon and name is blank until opened.

Steps To Reproduce

  1. Open a folder or sidebar item in a new tab (Middle click or context menu)

Requirements

  • Display tab icon and name

Files Version

3.5.10.0

Windows Version

10.0.22621.3737

Log File

debug.log

@yaira2
Copy link
Member

yaira2 commented Jul 19, 2024

Does the icon load if you switch tabs?

@Josh65-2201
Copy link
Member Author

Yes it show normally when switch to

@MrFrawsty
Copy link
Contributor

I believe I found the issue. at Files.App\Helpers\Navigation\NavigationHelpers.cs inside the UpdateTabInfoAsync method there is this bit of code. I did not add this comment and I am not familiar enough with the project to understand exactly how a1 and a2 are checking if the contents of the tab have changed. However, it is keeping the tab from initially loading the header, icon and tooltip.

If someone more familiar with how this works would like to advise me, I'd be happy to fix it. Otherwise feel free to just fix it if that's faster/easier for you :)

// Don't update tabItem if the contents of the tab have already changed
if (result.Item1 is not null)
{
	var navigationParameter = tabItem.NavigationParameter.NavigationParameter;
	var a1 = navigationParameter is PaneNavigationArguments pna1 ? pna1 : new PaneNavigationArguments() { LeftPaneNavPathParam = navigationParameter as string };
	var a2 = navigationArg is PaneNavigationArguments pna2 ? pna2 : new PaneNavigationArguments() { LeftPaneNavPathParam = navigationArg as string };

	if (a1 == a2)
		(tabItem.Header, tabItem.IconSource, tabItem.ToolTipText) = result;
}

@yaira2
Copy link
Member

yaira2 commented Jul 28, 2024

Fyi @hishitetsu

@hishitetsu
Copy link
Member

That code is for #12939. It used to work fine, so the recent changes must have prevented it from working properly.

@hishitetsu
Copy link
Member

I submitted a PR to fix this issue. #15898
@MrFrawsty thank you for the information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
4 participants