Skip to content

Commit dcb877c

Browse files
authored
Fixed an issue where folders weren't removed from the JumpList (#7867)
1 parent f97a200 commit dcb877c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/Files/Helpers/JumpListManager.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,16 @@ public async void RemoveFolder(string path)
132132
// In that case app should just catch the error and proceed as usual
133133
try
134134
{
135-
if (instance != null)
135+
if (instance == null)
136136
{
137-
if (JumpListItemPaths.Remove(path))
138-
{
139-
await instance.SaveAsync();
140-
}
137+
return;
138+
}
139+
140+
if (JumpListItemPaths.Remove(path))
141+
{
142+
var itemToRemove = instance.Items.Where(x => x.Arguments == path).Select(x => x).FirstOrDefault();
143+
instance.Items.Remove(itemToRemove);
144+
await instance.SaveAsync();
141145
}
142146
}
143147
catch { }

0 commit comments

Comments
 (0)