Skip to content

Commit 9ec920b

Browse files
committed
Don't add empty auto join channels
1 parent 1a6e64d commit 9ec920b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/util/settings_menus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,8 @@ def save_splitter_sizes(self) -> None:
604604

605605
def add_autojoin_channel(self) -> None:
606606
channel, ok = QInputDialog.getText(self, "Add Channel", "Enter channel name:")
607-
if ok:
608-
self.listAutojoinChannels.addItem(channel.removeprefix("#").strip())
607+
if ok and (normalized_name := channel.removeprefix("#").strip()):
608+
self.listAutojoinChannels.addItem(normalized_name)
609609
self.enable_apply_button()
610610

611611
def remove_autojoin_channel(self) -> None:

0 commit comments

Comments
 (0)