-
-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling Empty Narrows #1543
base: main
Are you sure you want to change the base?
Handling Empty Narrows #1543
Changes from 1 commit
4992dbe
936cf2f
6cac57d
f8503f8
dcb213a
0fb5bf0
df2feb4
299a1c1
3444552
2a66297
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,8 +198,23 @@ def private_header(self) -> Any: | |
header.markup = title_markup | ||
return header | ||
|
||
def empty_narrow_header(self) -> Any: | ||
title_markup = ("header", [("general_narrow", "No selected message")]) | ||
title = urwid.Text(title_markup) | ||
header = urwid.Columns( | ||
[ | ||
("pack", title), | ||
(1, urwid.Text(("general_bar", " "))), | ||
urwid.AttrWrap(urwid.Divider(MESSAGE_HEADER_DIVIDER), "general_bar"), | ||
] | ||
) | ||
header.markup = title_markup | ||
return header | ||
|
||
def recipient_header(self) -> Any: | ||
if self.message["type"] == "stream": | ||
if self.model.controller.is_in_empty_narrow: | ||
return self.empty_narrow_header() | ||
elif self.message["type"] == "stream": | ||
Comment on lines
-202
to
+218
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a partial fix towards the issue? That is, we start to show a different message in the message header and the current-message header? Assuming so, the commit text could indicate that. Does the new header structure need to follow the form of the others? I know it's rather hacky in places, so it's likely fine for now. |
||
return self.stream_header() | ||
else: | ||
return self.private_header() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it would be clearer to simply leave this blank?