Skip to content

Fix: Fixed issue where Details/Preview Pane didn't update when switching tabs #12975

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

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions src/Files.App/Views/LayoutModes/BaseLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,11 @@ await DispatcherQueue.EnqueueOrInvokeAsync(() =>
}
}

public void ReloadPreviewPane()
{
UpdatePreviewPaneSelection(SelectedItems);
}

protected void UpdatePreviewPaneSelection(List<ListedItem>? value)
{
if (LockPreviewPaneContent)
Expand Down
2 changes: 2 additions & 0 deletions src/Files.App/Views/LayoutModes/IBaseLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@ public interface IBaseLayout : IDisposable
CommandBarFlyout ItemContextMenuFlyout { get; set; }

CommandBarFlyout BaseContextMenuFlyout { get; set; }

void ReloadPreviewPane();
}
}
2 changes: 2 additions & 0 deletions src/Files.App/Views/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ public void MultitaskingControl_CurrentInstanceChanged(object? sender, CurrentIn

e.CurrentInstance.ContentChanged -= TabItemContent_ContentChanged;
e.CurrentInstance.ContentChanged += TabItemContent_ContentChanged;

SidebarAdaptiveViewModel.PaneHolder?.ActivePaneOrColumn.SlimContentPage?.ReloadPreviewPane();
}

private void PaneHolder_PropertyChanged(object? sender, PropertyChangedEventArgs e)
Expand Down