This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-23
lines changed
src/GitHub.InlineReviews/ViewModels Expand file tree Collapse file tree 1 file changed +14
-23
lines changed Original file line number Diff line number Diff line change @@ -137,33 +137,24 @@ async Task DoDelete(object unused)
137137 MessageBoxButton . YesNo ,
138138 MessageBoxImage . Question ) ;
139139
140- switch ( result )
140+ if ( result == MessageBoxResult . Yes )
141141 {
142- case ( MessageBoxResult . Yes ) :
142+ try
143143 {
144- try
145- {
146- ErrorMessage = null ;
147- IsSubmitting = true ;
148-
149- await Thread . DeleteComment . ExecuteAsyncTask ( new Tuple < int , int > ( PullRequestId , DatabaseId ) ) ;
150- }
151- catch ( Exception e )
152- {
153- var message = e . Message ;
154- ErrorMessage = message ;
155- log . Error ( e , "Error Deleting comment" ) ;
156- }
157- finally
158- {
159- IsSubmitting = false ;
160- }
161- break ;
162- }
144+ ErrorMessage = null ;
145+ IsSubmitting = true ;
163146
164- case ( MessageBoxResult . No ) :
147+ await Thread . DeleteComment . ExecuteAsyncTask ( new Tuple < int , int > ( PullRequestId , DatabaseId ) ) ;
148+ }
149+ catch ( Exception e )
150+ {
151+ var message = e . Message ;
152+ ErrorMessage = message ;
153+ log . Error ( e , "Error Deleting comment" ) ;
154+ }
155+ finally
165156 {
166- break ;
157+ IsSubmitting = false ;
167158 }
168159 }
169160 }
You can’t perform that action at this time.
0 commit comments