workflow/status: use workflow/blocking
#include "status.h"
+#include "blocking.h"
+
#include <ui/components/status.h>
-#include <ui/screen_process.h>
#include <ui/screen_stack.h>
-static bool _done = true;
-static bool _is_done(void)
-{
- return _done;
-}
-static void _set_done(void)
-{
- _done = true;
-}
-
void workflow_status_create(const char* msg, bool status_success)
{
- _done = false;
- ui_screen_stack_push(status_create(msg, status_success, STATUS_DEFAULT_DELAY, _set_done));
- ui_screen_process(_is_done);
+ ui_screen_stack_push(
+ status_create(msg, status_success, STATUS_DEFAULT_DELAY, workflow_blocking_unblock));
+ bool result = workflow_blocking_block();
ui_screen_stack_pop();
+ if (!result) {
+ // Ignore, not critical if status screen is removed in a cancel operation.
+ }
}
