File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,9 +111,6 @@ async Task ActivateAsync()
111111 Logger = Ioc . Default . GetRequiredService < ILogger < App > > ( ) ;
112112 AppModel = Ioc . Default . GetRequiredService < AppModel > ( ) ;
113113
114- var thumbnailService = Ioc . Default . GetRequiredService < IThumbnailService > ( ) ;
115- FileThumbnailHelper . Initialize ( thumbnailService ) ;
116-
117114 // Hook events for the window
118115 MainWindow . Instance . Closed += Window_Closed ;
119116 MainWindow . Instance . Activated += Window_Activated ;
Original file line number Diff line number Diff line change @@ -104,6 +104,8 @@ public static async Task InitializeAppComponentsAsync()
104104 var addItemService = Ioc . Default . GetRequiredService < IAddItemService > ( ) ;
105105 var generalSettingsService = userSettingsService . GeneralSettingsService ;
106106 var jumpListService = Ioc . Default . GetRequiredService < IWindowsJumpListService > ( ) ;
107+ var thumbnailService = Ioc . Default . GetRequiredService < IThumbnailService > ( ) ;
108+ FileThumbnailHelper . Initialize ( thumbnailService ) ;
107109
108110 // Start off a list of tasks we need to run before we can continue startup
109111 await Task . WhenAll (
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ namespace Files.App.Utils.Storage
88{
99 public static class FileThumbnailHelper
1010 {
11- private static IThumbnailService ? _thumbnailService ;
11+ private static IThumbnailService ? thumbnailService ;
1212
1313 public static void Initialize ( IThumbnailService thumbnailService )
1414 {
15- _thumbnailService = thumbnailService ;
15+ FileThumbnailHelper . thumbnailService = thumbnailService ;
1616 }
1717
1818 /// <summary>
@@ -24,9 +24,9 @@ public static void Initialize(IThumbnailService thumbnailService)
2424 // Ensure size is at least 1 to prevent layout errors
2525 size = Math . Max ( 1 , size ) ;
2626
27- if ( _thumbnailService is not null )
27+ if ( thumbnailService is not null )
2828 {
29- return await _thumbnailService . GetThumbnailAsync (
29+ return await thumbnailService . GetThumbnailAsync (
3030 path ,
3131 ( int ) size ,
3232 isFolder ,
You can’t perform that action at this time.
0 commit comments