@@ -42,6 +42,7 @@ sealed partial class AllSettingsViewModel : ObservableObject, IDisposable
4242 WriteIndented = true ,
4343 } ;
4444 private readonly IUpdateChecker updateChecker ;
45+ private readonly IReviewRequestService reviewRequestService ;
4546 private readonly IContentDialogService dialogService ;
4647 private readonly IPresentationService presentationService ;
4748 private readonly IAutoTargetStore autoTargetStore ;
@@ -100,11 +101,14 @@ sealed partial class AllSettingsViewModel : ObservableObject, IDisposable
100101
101102 public bool IsVisibleAbout { get ; } = ! AppInfo . SuppressMode ;
102103
104+ public bool IsVisibleReviewButton => this . reviewRequestService . CanOpenReview ;
105+
103106 public AllSettingsViewModel (
104107 [ Inject ] PluginProvider provider ,
105108 [ Inject ] IOptionsSnapshot < UserSettings > options ,
106109 [ Inject ] IServiceProvider sp ,
107110 [ Inject ] IUpdateChecker updateChecker ,
111+ [ Inject ] IReviewRequestService reviewRequestService ,
108112 [ Inject ] IContentDialogService dialogService ,
109113 [ Inject ] IPresentationService presentationService ,
110114 [ Inject ] IAutoTargetStore autoTargetStore ,
@@ -145,6 +149,7 @@ public AllSettingsViewModel(
145149 this . SelectedTarget = selected ;
146150
147151 this . updateChecker = updateChecker ;
152+ this . reviewRequestService = reviewRequestService ;
148153 this . dialogService = dialogService ;
149154 this . presentationService = presentationService ;
150155 this . autoTargetStore = autoTargetStore ;
@@ -210,6 +215,10 @@ private static bool GetIsStartup()
210215 private static ModuleItem Convert ( Plugin plugin )
211216 => new ( plugin . Type . Name , plugin . Name , plugin . Type . IsDefined ( typeof ( DefaultModuleAttribute ) ) ) ;
212217
218+ [ RelayCommand ]
219+ public Task OpenReviewAsync ( )
220+ => this . reviewRequestService . OpenReviewPageAsync ( ) ;
221+
213222 [ RelayCommand ]
214223 public void DeleteAutoTarget ( string item )
215224 => this . AutoTargets . Remove ( item ) ;
0 commit comments