diff options
author | Edwin van Leeuwen <edwinvanl@tuta.io> | 2022-09-28 08:17:29 +0100 |
---|---|---|
committer | Edwin van Leeuwen <edwinvanl@tuta.io> | 2022-09-28 08:17:29 +0100 |
commit | 03225ed3dd0b8d1d1c65bbe964184891e4a5d14e (patch) | |
tree | abce2cd1297949a78c430d5945fab41389651994 | |
parent | a8afcd9387754f989288236ca9ca674ca62a9267 (diff) |
bug: Run update on the active_storage types defined in main
This fixes #34, because it will prune old items from active_storage.
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index fd00e29..b26ed3f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -124,7 +124,7 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv) { rttt::active_storage<std::string, rttt::view::item_state> item_view_states = rttt::config::load_item_view_states_or( rttt::active_storage<std::string, rttt::view::item_state>( - 0, 10, 3 * 24 * 3600)); + 0, 10, 3 * 24 * 3601)); // Drawing windows auto screen = ftxui::ScreenInteractive::Fullscreen(); @@ -346,6 +346,8 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv) { if (logger::size() > 100) logger::pop_front(); if (counter % 10000 == 0) { + item_view_states.update(); + window_state_cache.update(); rttt::config::save_item_view_states(item_view_states); rttt::config::save_prompt_state(prompt_state); } |