Skip to content

Commit 9d75f50

Browse files
committed
messages: Update poll_question with a default text if empty.
This prevents an empty-title popup in the Poll Results view.
1 parent 78fd5df commit 9d75f50

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: zulipterminal/ui_tools/messages.py

+5
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,11 @@ def main_view(self) -> List[Any]:
771771
else "No poll question provided. Please add one via the web app."
772772
)
773773

774+
if not self.poll_question:
775+
# If no poll question is provided, set a message to display
776+
# in Poll Results popup.
777+
self.poll_question = "No poll question provided."
778+
774779
if self.poll_options:
775780
max_votes_len = max(
776781
len(str(len(option["votes"])))

0 commit comments

Comments
 (0)