diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-08-16 20:24:28 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-08-16 20:24:28 +0200 |
| commit | 543aa7d53136037f07302a5653bba90751ac1552 (patch) | |
| tree | 0911a4fbba487fbb28acb6a5934af0a95c024c64 /src/ui/ui_main.cpp | |
| parent | 50848b2dd97093dd407ed7199118bca011f1aa4c (diff) | |
more refactors
Diffstat (limited to 'src/ui/ui_main.cpp')
| -rw-r--r-- | src/ui/ui_main.cpp | 11 |
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](); } |
