diff --git a/src/uosc/lib/text.lua b/src/uosc/lib/text.lua index 7db7209b..3f5d7c59 100644 --- a/src/uosc/lib/text.lua +++ b/src/uosc/lib/text.lua @@ -408,6 +408,10 @@ do ---@type {[string]: string} local cache = {} + function timestamp_zero_rep_clear_cache() + cache = {} + end + ---Replace all timestamp digits with 0 ---@param timestamp string function timestamp_zero_rep(timestamp) diff --git a/src/uosc/main.lua b/src/uosc/main.lua index 3f7ad508..6b5d8768 100644 --- a/src/uosc/main.lua +++ b/src/uosc/main.lua @@ -102,7 +102,10 @@ defaults = { disable_elements = '', } options = table_copy(defaults) -opt.read_options(options, 'uosc', function(_) +opt.read_options(options, 'uosc', function(changed_options) + if changed_options.time_precision then + timestamp_zero_rep_clear_cache() + end update_config() update_human_times() Manager:disable('user', options.disable_elements)