Skip to content

Commit f358a2b

Browse files
committed
fix(app): refresh after suspend
Fix the app display not refreshing after `action_suspend_process`. A similar issue was reported in #5528 but specifically when using the `App.suspend` context manager. This was fixed in 81392ff by adding `refresh(layout=True)`, however this doesn't cover when the app was suspended with `action_suspend_process`. This simply moves that call to `refresh` to account for both suspend methods. Related issue: #6298
1 parent f901b37 commit f358a2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/textual/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4594,6 +4594,7 @@ def _suspend_signal(self) -> None:
45944594
def _resume_signal(self) -> None:
45954595
"""Signal that the application is being resumed from a suspension."""
45964596
self.app_resume_signal.publish(self)
4597+
self.refresh(layout=True)
45974598

45984599
@contextmanager
45994600
def suspend(self) -> Iterator[None]:
@@ -4642,7 +4643,6 @@ def suspend(self) -> Iterator[None]:
46424643
self._driver.resume_application_mode()
46434644
# ...and publish a resume signal.
46444645
self._resume_signal()
4645-
self.refresh(layout=True)
46464646
else:
46474647
raise SuspendNotSupported(
46484648
"App.suspend is not supported in this environment."

0 commit comments

Comments
 (0)