File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1419,7 +1419,7 @@ def _validate_theme(self, theme_name: str) -> str:
14191419 raise InvalidThemeError (message )
14201420 return theme_name
14211421
1422- async def _watch_theme (self , theme_name : str ) -> None :
1422+ def _watch_theme (self , theme_name : str ) -> None :
14231423 """Apply a theme to the application.
14241424
14251425 This method is called when the theme reactive attribute is set.
@@ -3657,8 +3657,9 @@ def refresh_css(self, animate: bool = True) -> None:
36573657 stylesheet .reparse ()
36583658 stylesheet .update (self .app , animate = animate )
36593659 try :
3660- self .screen ._refresh_layout (self .size )
3661- self .screen ._css_update_count = self ._css_update_count
3660+ if self .screen .is_mounted :
3661+ self .screen ._refresh_layout (self .size )
3662+ self .screen ._css_update_count = self ._css_update_count
36623663 except ScreenError :
36633664 pass
36643665 # The other screens in the stack will need to know about some style
You can’t perform that action at this time.
0 commit comments