Skip to content

Commit

Permalink
add check if show_cofirm is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Nov 10, 2024
1 parent b2658c3 commit a5fa260
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dooit/ui/widgets/trees/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ def wrapper(self: "ModelTree", *args, **kwargs) -> Any:

def require_confirmation(func: Callable) -> Callable:
def wrapper(self: "ModelTree", *args, **kwargs) -> Any:
if not self.api.vars.show_confirm:
return func()

self.post_message(ShowConfirm(func, *args, **kwargs))

return wrapper

0 comments on commit a5fa260

Please sign in to comment.