Skip to content

Commit ea15220

Browse files
authored
Re-add some code removed in #5538 (#7439)
1 parent 1727863 commit ea15220

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Files/Views/Pages/PropertiesSecurity.xaml.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ protected override void Properties_Loaded(object sender, RoutedEventArgs e)
7070

7171
public override void Dispose()
7272
{
73+
if (propsView != null)
74+
{
75+
propsView.Consolidated -= PropsView_Consolidated;
76+
}
7377
}
7478

7579
private async void OpenAdvancedProperties()
@@ -100,6 +104,7 @@ await newWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
100104
propsView.Title = string.Format("SecurityAdvancedPermissionsTitle".GetLocalized(), SecurityProperties.Item.ItemName);
101105
propsView.PersistedStateId = "PropertiesSecurity";
102106
propsView.SetPreferredMinSize(new Size(400, 500));
107+
propsView.Consolidated += PropsView_Consolidated;
103108

104109
bool viewShown = await ApplicationViewSwitcher.TryShowAsStandaloneAsync(propsView.Id);
105110
if (viewShown && propsView != null)
@@ -116,5 +121,16 @@ await newWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
116121
// Unsupported
117122
}
118123
}
124+
125+
private async void PropsView_Consolidated(ApplicationView sender, ApplicationViewConsolidatedEventArgs args)
126+
{
127+
propsView.Consolidated -= PropsView_Consolidated;
128+
propsView = null;
129+
130+
if (SecurityProperties != null)
131+
{
132+
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => SecurityProperties.GetFilePermissions()); // Reload permissions
133+
}
134+
}
119135
}
120136
}

0 commit comments

Comments
 (0)