Skip to content

Commit e1429e9

Browse files
sumanthvraomkp6781
authored andcommitted
buttons: Connect PopUp confirmation display for topics via keypress.
On pressing TOGGLE_MUTE_TOPIC, we now ask for confirmation before performing the action of muting/unmuting topics.
1 parent 08afa30 commit e1429e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

zulipterminal/ui_tools/buttons.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,11 @@ def mark_unmuted(self) -> None:
307307
# All messages in this topic are read.
308308
self.set_button_counts(0)
309309

310+
def keypress(self, size: urwid_Size, key: str) -> Optional[str]:
311+
if is_command_key('TOGGLE_MUTE_TOPIC', key):
312+
self.controller.topic_muting_confirmation_popup(self)
313+
return super().keypress(size, key)
314+
310315

311316
class UnreadPMButton(urwid.Button):
312317
def __init__(self, user_id: int, email: str) -> None:

0 commit comments

Comments
 (0)