Commit 51adba9 1 parent 4cd593d commit 51adba9 Copy full SHA for 51adba9
File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -159,12 +159,14 @@ public static async Task<ProtocolsResultCode> UnregisterProtocol()
159
159
// UI popup stuff
160
160
public static async Task OptionsManualPopup ( MainWindow control )
161
161
{
162
+ var existing = CheckExisting ( ) ;
163
+
162
164
// Not using ConfirmDialogBuilder because I am not sure how to make it support variables or whatever they are named
163
165
var dialog = new ConfirmDialog
164
166
{
165
167
Title = LocalizationManager . Instance . GetString ( "protocols-dialog-title" ) ,
166
168
DialogContent = LocalizationManager . Instance . GetString ( "protocols-dialog-content-action-question" ,
167
- ( "action" , CheckExisting ( ) ? LocalizationManager . Instance . GetString ( "protocols-dialog-action-register" )
169
+ ( "action" , existing ? LocalizationManager . Instance . GetString ( "protocols-dialog-action-register" )
168
170
: LocalizationManager . Instance . GetString ( "protocols-dialog-action-unregister" ) ) ) ,
169
171
ConfirmButtonText = LocalizationManager . Instance . GetString ( "protocols-dialog-continue" ) ,
170
172
CancelButtonText = LocalizationManager . Instance . GetString ( "protocols-dialog-back" ) ,
@@ -174,7 +176,7 @@ public static async Task OptionsManualPopup(MainWindow control)
174
176
175
177
if ( question )
176
178
{
177
- var result = CheckExisting ( ) ? await UnregisterProtocol ( ) : await RegisterProtocol ( ) ;
179
+ var result = existing ? await UnregisterProtocol ( ) : await RegisterProtocol ( ) ;
178
180
await HandleResult ( result , control ) ;
179
181
}
180
182
}
You can’t perform that action at this time.
0 commit comments