widgets: ConfirmationView: Allow the widget to manage its own visibility
When the buttons are pressed then the widget should be dismissed. There is no reason to make the caller handle that. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This commit is contained in:
parent
40ac92094e
commit
167173e9ba
1 changed files with 2 additions and 0 deletions
|
@ -354,8 +354,10 @@ class ConfirmationView:
|
|||
)
|
||||
|
||||
if is_yes_button_press:
|
||||
self.active = False
|
||||
return True
|
||||
elif is_no_button_press:
|
||||
self.active = False
|
||||
return False
|
||||
else:
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue