Skip to content

Commit bd5c9ee

Browse files
Remove redundant messages.
Now that the watcher for `TabbedContent.active` accepts empty strings and emits the message `TabbedContent.Cleared` if `active` is the empty string, we don't need to explicit emit the messages in these two locations.
1 parent 8aba7b7 commit bd5c9ee

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/textual/widgets/_tabbed_content.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,6 @@ def remove_pane(self, pane_id: str) -> AwaitComplete:
455455

456456
async def _remove_content() -> None:
457457
await gather(*removal_awaitables)
458-
if self.tab_count == 0:
459-
self.post_message(self.Cleared(self).set_sender(self))
460458

461459
return AwaitComplete(_remove_content())
462460

@@ -474,7 +472,6 @@ def clear_panes(self) -> AwaitComplete:
474472

475473
async def _clear_content() -> None:
476474
await await_clear
477-
self.post_message(self.Cleared(self).set_sender(self))
478475

479476
return AwaitComplete(_clear_content())
480477

0 commit comments

Comments
 (0)