File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/Files.App/ServicesImplementation Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
- using Files . App . Controllers ;
2
- using Files . App . DataModels ;
3
- using Files . App . Filesystem ;
4
- using Files . App . Shell ;
1
+ using Files . App . Shell ;
5
2
using Files . Shared . Extensions ;
6
3
using System ;
7
4
using System . Collections . Generic ;
@@ -20,7 +17,9 @@ public async Task<List<string>> GetPinnedFoldersAsync()
20
17
. Where ( link => link . IsFolder )
21
18
. Select ( link => link . FilePath ) . ToList ( ) ;
22
19
23
- sidebarItems . RemoveRange ( sidebarItems . Count - 4 , 4 ) ; // 4 is the number of recent items shown in explorer sidebar
20
+ if ( sidebarItems . Count > 4 ) // Avoid first opening crash #11139
21
+ sidebarItems . RemoveRange ( sidebarItems . Count - 4 , 4 ) ; // 4 is the number of recent items shown in explorer sidebar
22
+
24
23
return sidebarItems ;
25
24
}
26
25
You can’t perform that action at this time.
0 commit comments