@@ -73,12 +73,6 @@ public MainPage()
73
73
ToggleCompactOverlayCommand = new RelayCommand ( ToggleCompactOverlay ) ;
74
74
SetCompactOverlayCommand = new RelayCommand < bool > ( SetCompactOverlay ) ;
75
75
76
- if ( SystemInformation . Instance . TotalLaunchCount >= 15 & Package . Current . Id . Name == "49306atecsolution.FilesUWP" && ! UserSettingsService . ApplicationSettingsService . WasPromptedToReview )
77
- {
78
- PromptForReview ( ) ;
79
- UserSettingsService . ApplicationSettingsService . WasPromptedToReview = true ;
80
- }
81
-
82
76
UserSettingsService . OnSettingChangedEvent += UserSettingsService_OnSettingChangedEvent ;
83
77
84
78
DispatcherQueue . TryEnqueue ( async ( ) => await LoadSelectedTheme ( ) ) ;
@@ -90,17 +84,17 @@ private async Task LoadSelectedTheme()
90
84
await App . ExternalResourcesHelper . LoadSelectedTheme ( ) ;
91
85
}
92
86
93
- private async void PromptForReview ( )
87
+ private async Task PromptForReview ( )
94
88
{
95
- var AskForReviewDialog = new ContentDialog
89
+ var promptForReviewDialog = new ContentDialog
96
90
{
97
91
Title = "ReviewFiles" . ToLocalized ( ) ,
98
92
Content = "ReviewFilesContent" . ToLocalized ( ) ,
99
93
PrimaryButtonText = "Yes" . ToLocalized ( ) ,
100
94
SecondaryButtonText = "No" . ToLocalized ( )
101
95
} ;
102
96
103
- var result = await this . SetContentDialogRoot ( AskForReviewDialog ) . ShowAsync ( ) ;
97
+ var result = await this . SetContentDialogRoot ( promptForReviewDialog ) . ShowAsync ( ) ;
104
98
105
99
if ( result == ContentDialogResult . Primary )
106
100
{
@@ -111,6 +105,8 @@ private async void PromptForReview()
111
105
}
112
106
catch ( Exception ) { }
113
107
}
108
+
109
+ UserSettingsService . ApplicationSettingsService . WasPromptedToReview = true ;
114
110
}
115
111
116
112
// WINUI3
@@ -328,6 +324,17 @@ private void Page_Loaded(object sender, RoutedEventArgs e)
328
324
FindName ( nameof ( InnerNavigationToolbar ) ) ;
329
325
FindName ( nameof ( horizontalMultitaskingControl ) ) ;
330
326
FindName ( nameof ( NavToolbar ) ) ;
327
+
328
+ // Prompt user to review app in the Store
329
+ if
330
+ (
331
+ SystemInformation . Instance . TotalLaunchCount >= 15 &
332
+ Package . Current . Id . Name == "49306atecsolution.FilesUWP" &&
333
+ ! UserSettingsService . ApplicationSettingsService . WasPromptedToReview
334
+ )
335
+ {
336
+ DispatcherQueue . TryEnqueue ( async ( ) => await PromptForReview ( ) ) ;
337
+ }
331
338
}
332
339
333
340
private void Page_SizeChanged ( object sender , SizeChangedEventArgs e )
0 commit comments