-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
fix: tristate toggle logic for tab visibilty #5530
fix: tristate toggle logic for tab visibilty #5530
Conversation
…ility-to-some-logic-that-might-not-be-logical
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.
It would probably be good to know if the removed hotkey was used.
This PR should also mention #5341. One thing that gets lost is the visibility of the toggle hotkey inside the context menu.
Now the state graph looks like this:
graph TD;
All-->|liveOnly|LiveOnly
LiveOnly-->|on|All
LiveOnly-->|toggle|None
LiveOnly-->|liveOnly|LiveOnly
LiveOnly-->|off|None
All<-->|toggle|None
All-->|off|None
All-->|on|All
None-->|off|None
None-->|liveOnly|LiveOnly
|
||
for (int index = 0; index < this->items_.size(); ++index) | ||
{ | ||
T item = this->items_[index]; |
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.
This copies all items, but only the to-be-removed item should be copied.
Anecdotally, I've only heard of people using the removed hotkey accidentally and wondering why some of their tabs are missing |
…ility-to-some-logic-that-might-not-be-logical
[skip ci]
Since they don't rely on any runtime data, this ensures they can be used before Application is instansiated
…ility-to-some-logic-that-might-not-be-logical
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.
clang-tidy made some suggestions
…t-might-not-be-logical
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.
clang-tidy made some suggestions
…t-might-not-be-logical
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.
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.
clang-tidy made some suggestions
} | ||
|
||
void HotkeyController::warnForRemovedHotkeyActions(HotkeyCategory category, | ||
QString action, |
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.
warning: the parameter 'action' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
src/controllers/hotkeys/HotkeyController.hpp:146:
- void warnForRemovedHotkeyActions(HotkeyCategory category, QString action,
+ void warnForRemovedHotkeyActions(HotkeyCategory category, const QString& action,
QString action, | |
const QString& action, |
|
||
void HotkeyController::warnForRemovedHotkeyActions(HotkeyCategory category, | ||
QString action, | ||
std::vector<QString> args) |
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.
warning: the parameter 'args' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
src/controllers/hotkeys/HotkeyController.hpp:147:
- std::vector<QString> args);
+ const std::vector<QString>& args);
std::vector<QString> args) | |
const std::vector<QString>& args) |
This removes the "toggle live" option for tab visibilty options, including the hotkey. so this tries to remove the hotkey if it hasn't been touched by the user
This changes the tab visibilty options in the menu from "toggle" & "toggle live" to "show all", "show live only", and "hide all" in a submenu
This removes all tab visibility options for the emote popup
For previous context, see #5353
The existing toggle option will reset the
live only
filter, and switch between "hide all" and "show all"Fixes #5341