File tree 4 files changed +9
-7
lines changed
tools/Dashboard/DevHome.Dashboard
4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ public async Task<WidgetCatalog> GetWidgetCatalogAsync()
131
131
}
132
132
catch ( Exception ex )
133
133
{
134
- _log . Error ( ex , "Exception in GetWidgetDefinitionAsync :" ) ;
134
+ _log . Error ( ex , "Exception in GetWidgetCatalogAsync :" ) ;
135
135
_widgetCatalog = null ;
136
136
}
137
137
}
@@ -161,7 +161,7 @@ public async Task<WidgetProviderDefinition[]> GetProviderDefinitionsAsync()
161
161
}
162
162
catch ( Exception ex )
163
163
{
164
- _log . Error ( ex , "Exception in GetWidgetDefinitionAsync :" ) ;
164
+ _log . Error ( ex , "Exception in GetProviderDefinitionsAsync :" ) ;
165
165
}
166
166
}
167
167
@@ -190,7 +190,7 @@ public async Task<WidgetDefinition[]> GetWidgetDefinitionsAsync()
190
190
}
191
191
catch ( Exception ex )
192
192
{
193
- _log . Error ( ex , "Exception in GetWidgetDefinitionAsync :" ) ;
193
+ _log . Error ( ex , "Exception in GetWidgetDefinitionsAsync :" ) ;
194
194
}
195
195
}
196
196
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public partial class DashboardViewModel : ObservableObject
25
25
private bool _isLoading ;
26
26
27
27
[ ObservableProperty ]
28
- private bool _hasWidgetService ;
28
+ private bool _hasWidgetServiceInitialized ;
29
29
30
30
public DashboardViewModel (
31
31
IWidgetServiceService widgetServiceService ,
@@ -43,7 +43,7 @@ public DashboardViewModel(
43
43
44
44
public Visibility GetNoWidgetMessageVisibility ( int widgetCount , bool isLoading )
45
45
{
46
- return ( widgetCount == 0 && ! isLoading && HasWidgetService ) ? Visibility . Visible : Visibility . Collapsed ;
46
+ return ( widgetCount == 0 && ! isLoading && HasWidgetServiceInitialized ) ? Visibility . Visible : Visibility . Collapsed ;
47
47
}
48
48
49
49
public bool IsRunningAsAdmin ( )
Original file line number Diff line number Diff line change 60
60
x : Uid =" AddWidget"
61
61
HorizontalAlignment =" Right"
62
62
Command =" {x:Bind AddWidgetClickCommand}"
63
- IsEnabled =" {x:Bind ViewModel.HasWidgetService , Mode=OneWay}" />
63
+ IsEnabled =" {x:Bind ViewModel.HasWidgetServiceInitialized , Mode=OneWay}" />
64
64
</StackPanel >
65
65
</Grid >
66
66
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ private async Task<bool> SubscribeToWidgetCatalogEventsAsync()
86
86
var widgetCatalog = await ViewModel . WidgetHostingService . GetWidgetCatalogAsync ( ) ;
87
87
if ( widgetCatalog == null )
88
88
{
89
+ _log . Error ( "Error in in SubscribeToWidgetCatalogEvents, widgetCatalog == null" ) ;
89
90
return false ;
90
91
}
91
92
@@ -194,9 +195,10 @@ private async Task InitializeDashboard()
194
195
}
195
196
else if ( ViewModel . WidgetServiceService . CheckForWidgetServiceAsync ( ) )
196
197
{
197
- ViewModel . HasWidgetService = true ;
198
198
if ( await SubscribeToWidgetCatalogEventsAsync ( ) )
199
199
{
200
+ ViewModel . HasWidgetServiceInitialized = true ;
201
+
200
202
var isFirstDashboardRun = ! ( await _localSettingsService . ReadSettingAsync < bool > ( WellKnownSettingsKeys . IsNotFirstDashboardRun ) ) ;
201
203
_log . Information ( $ "Is first dashboard run = { isFirstDashboardRun } ") ;
202
204
if ( isFirstDashboardRun )
You can’t perform that action at this time.
0 commit comments