1
0
Fork 0

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>
pull/112/head
Daniel Thompson 2020-11-29 08:58:37 +00:00
parent 40ac92094e
commit 167173e9ba
1 changed files with 2 additions and 0 deletions

View File

@ -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