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

Fix: Save tab list on path change #14874

Merged
merged 2 commits into from
Mar 1, 2024
Merged

Fix: Save tab list on path change #14874

merged 2 commits into from
Mar 1, 2024

Conversation

yaira2
Copy link
Member

@yaira2 yaira2 commented Mar 1, 2024

Follow up for #14857

@yaira2 yaira2 changed the title Fix: Save tabs when path changes Fix: Save tab list on path change Mar 1, 2024
@@ -167,6 +167,9 @@ public async void TabItemContent_ContentChanged(object? sender, CustomTabViewIte
LoadPaneChanged();
UpdateNavToolbarProperties();
await NavigationHelpers.UpdateInstancePropertiesAsync(paneArgs);

// Save the updated tab list
AppLifecycleHelper.SaveSessionTabs();
Copy link
Member Author

Choose a reason for hiding this comment

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

For some time this code runs twice when a second pane is added

Copy link
Member

Choose a reason for hiding this comment

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

This can be avoided by modifying PangeHolderPage.IsRightPaneVisible setter as follows:

			set
			{
				if (value != _IsRightPaneVisible)
				{
					_IsRightPaneVisible = value;
					if (!_IsRightPaneVisible)
					{
						ActivePane = PaneLeft;
						Pane_ContentChanged(null, null);
					}

					NotifyPropertyChanged(nameof(IsRightPaneVisible));
					NotifyPropertyChanged(nameof(IsMultiPaneActive));
				}
			}

Copy link
Member Author

@yaira2 yaira2 Mar 1, 2024

Choose a reason for hiding this comment

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

Thanks! I pushed a commit with this change.

Copy link
Member

@hishitetsu hishitetsu left a comment

Choose a reason for hiding this comment

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

LGTM

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Mar 1, 2024
@yaira2 yaira2 merged commit 142d504 into main Mar 1, 2024
6 checks passed
@yaira2 yaira2 deleted the ya/SaveTabsOnPathChange branch March 1, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants