-
Notifications
You must be signed in to change notification settings - Fork 349
Fix menu items of type “Header” if no action is assigned to them #1509
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
base: public/9.1
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -1170,7 +1170,7 @@ sub _cliQuery_done { | |
| $hasImage = 1; | ||
| } | ||
|
|
||
| if ( $item->{type} && $item->{type} eq 'text' && !$item->{wrap} && !$item->{jive} ) { | ||
| if ( $item->{type} && ( ($item->{type} eq 'text' && !$item->{wrap} && !$item->{jive}) || ($item->{type} eq 'header' && !$item->{items} && !$item->{url}) ) ) { | ||
|
Member
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. Under what circumstances would a
Author
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. I am not aware of any. I suspect you overlooked the ‘!’.
Member
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. No, the exclusion is why I'm asking: why add that condition if it is expected to always be true? Seems to be just noise, rendering the condition difficult to read?
Author
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. A header can contain items or an URL (function pointer) or neither. |
||
| $hash{'style'} ||= 'itemNoAction'; | ||
| $hash{'action'} = 'none'; | ||
| } | ||
|
|
||
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.
Would a header have items? I guess that's the same comment as before: you said a header would never have items. Why keep the option to show the arrow in that not to be expected situation?
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.
A header can contain items or an URL (function pointer) or neither.