Have reloading config also reload the custom tab bar python modules

This commit is contained in:
Kovid Goyal
2025-11-13 14:41:46 +05:30
parent 2797b1f926
commit 83f0d6bc1a
3 changed files with 9 additions and 0 deletions

View File

@@ -161,6 +161,8 @@ Detailed list of changes
- :ac:`goto_session`: allow specifying a directory to select a session file
from the directory (:pull:`9219`)
- Have reloading config also reload the custom tab bar python modules (:disc:`9221`)
0.44.0 [2025-11-03]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -2938,6 +2938,8 @@ class Boss:
from .guess_mime_type import clear_mime_cache
clear_mime_cache()
store_effective_config()
from .tab_bar import clear_caches
clear_caches()
def safe_delete_temp_file(self, path: str) -> None:
if is_path_in_temp_dir(path):

View File

@@ -523,6 +523,11 @@ def load_custom_draw_tab() -> DrawTabFunc:
return draw_tab
def clear_caches() -> None:
load_custom_draw_tab.clear_cached()
load_custom_draw_tab_module.clear_cached()
class CustomDrawTitleFunc:
def __init__(self, data: dict[str, Any], implementation: Callable[[dict[str, Any]], str] | None = None):