Skip to content

Commit f2fe975

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 a82fa3d commit f2fe975

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
@@ -309,6 +309,11 @@ def mark_unmuted(self) -> None:
309309
# All messages in this topic are read.
310310
self.set_button_counts(0)
311311

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

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

0 commit comments

Comments
 (0)