@@ -25,8 +25,8 @@ public class GogOssLibrary : LibraryPluginBase<GogOssLibrarySettingsViewModel>
25
25
{
26
26
private static readonly ILogger logger = LogManager . GetLogger ( ) ;
27
27
public static GogOssLibrary Instance { get ; set ; }
28
- public GogOssDownloadManagerView GogOssDownloadManagerView { get ; set ; }
29
- private readonly SidebarItem downloadManagerSidebarItem ;
28
+ private GogOssDownloadManagerView GogOssDownloadManagerView ;
29
+ private SidebarItem downloadManagerSidebarItem ;
30
30
public Dictionary < string , Installed > installedAppList { get ; set ; }
31
31
public bool installedAppListModified { get ; set ; } = false ;
32
32
public CommonHelpers commonHelpers { get ; set ; }
@@ -45,28 +45,28 @@ public GogOssLibrary(IPlayniteAPI api) : base(
45
45
SettingsViewModel = new GogOssLibrarySettingsViewModel ( this , api ) ;
46
46
LoadExtraLocalization ( ) ;
47
47
LoadMenuIcons ( ) ;
48
- downloadManagerSidebarItem = new SidebarItem
49
- {
50
- Title = ResourceProvider . GetString ( LOC . GogOssPanel ) ,
51
- Icon = GogOss . Icon ,
52
- Type = SiderbarItemType . View ,
53
- Opened = ( ) => GetGogOssDownloadManager ( ) ,
54
- ProgressValue = 0 ,
55
- ProgressMaximum = 100 ,
56
- } ;
48
+ GogOssDownloadManagerView = new GogOssDownloadManagerView ( ) ;
57
49
}
58
50
59
51
public static SidebarItem GetPanel ( )
60
52
{
53
+ if ( Instance . downloadManagerSidebarItem == null )
54
+ {
55
+ Instance . downloadManagerSidebarItem = new SidebarItem
56
+ {
57
+ Title = ResourceProvider . GetString ( LOC . GogOssPanel ) ,
58
+ Icon = GogOss . Icon ,
59
+ Type = SiderbarItemType . View ,
60
+ Opened = ( ) => GetGogOssDownloadManager ( ) ,
61
+ ProgressValue = 0 ,
62
+ ProgressMaximum = 100 ,
63
+ } ;
64
+ }
61
65
return Instance . downloadManagerSidebarItem ;
62
66
}
63
67
64
68
public static GogOssDownloadManagerView GetGogOssDownloadManager ( )
65
69
{
66
- if ( Instance . GogOssDownloadManagerView == null )
67
- {
68
- Instance . GogOssDownloadManagerView = new GogOssDownloadManagerView ( ) ;
69
- }
70
70
return Instance . GogOssDownloadManagerView ;
71
71
}
72
72
0 commit comments