From 167173e9bac0776ebf91759d27a0333f90a7893b Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sun, 29 Nov 2020 08:58:37 +0000 Subject: [PATCH] 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 --- wasp/widgets.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wasp/widgets.py b/wasp/widgets.py index 39d8b19..d5abd16 100644 --- a/wasp/widgets.py +++ b/wasp/widgets.py @@ -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