summaryrefslogtreecommitdiff
path: root/src/ui/ui_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui_main.cpp')
-rw-r--r--src/ui/ui_main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ui/ui_main.cpp b/src/ui/ui_main.cpp
index d8fd5d4..19ab6b4 100644
--- a/src/ui/ui_main.cpp
+++ b/src/ui/ui_main.cpp
@@ -37,8 +37,19 @@ void (*setupcalls[dashboard_view_state::END])(void) = {
ui_setup_settings,
};
+void (*destroycalls[dashboard_view_state::END])(void) = {
+ ui_destroy_invoices,
+ 0,
+ 0,
+ 0,
+ 0,
+ ui_destroy_settings,
+ 0,
+};
+
static void set_dashboard_state(dashboard_view_state state)
{
+ if (dashboard_state != dashboard_view_state::END && destroycalls[dashboard_state]) destroycalls[dashboard_state]();
dashboard_state = state;
if (setupcalls[dashboard_state]) setupcalls[dashboard_state]();
}