Skip to content

Commit

Permalink
messages: Update poll_question with a default text if empty.
Browse files Browse the repository at this point in the history
This prevents an empty-title popup in the Poll Results view.
  • Loading branch information
rsashank committed Nov 4, 2024
1 parent 78fd5df commit 9d75f50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zulipterminal/ui_tools/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,11 @@ def main_view(self) -> List[Any]:
else "No poll question provided. Please add one via the web app."
)

if not self.poll_question:
# If no poll question is provided, set a message to display
# in Poll Results popup.
self.poll_question = "No poll question provided."

if self.poll_options:
max_votes_len = max(
len(str(len(option["votes"])))
Expand Down

0 comments on commit 9d75f50

Please sign in to comment.