Allow for customizing the behavior of Right Clicking of usernames. (#4622)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Mm2PL
2023-07-01 11:03:16 +00:00
committed by GitHub
parent 2f2c187f18
commit 2f272b37ca
4 changed files with 155 additions and 15 deletions
+20
View File
@@ -83,6 +83,12 @@ enum ThumbnailPreviewMode : int {
ShowOnShift = 2,
};
enum UsernameRightClickBehavior : int {
Reply = 0,
Mention = 1,
Ignore = 2,
};
/// Settings which are availlable for reading and writing on the gui thread.
// These settings are still accessed concurrently in the code but it is bad practice.
class Settings : public ABSettings, public ConcurrentSettings
@@ -194,6 +200,20 @@ public:
BoolSetting autoCloseUserPopup = {"/behaviour/autoCloseUserPopup", true};
BoolSetting autoCloseThreadPopup = {"/behaviour/autoCloseThreadPopup",
false};
EnumSetting<UsernameRightClickBehavior> usernameRightClickBehavior = {
"/behaviour/usernameRightClickBehavior",
UsernameRightClickBehavior::Mention,
};
EnumSetting<UsernameRightClickBehavior> usernameRightClickModifierBehavior =
{
"/behaviour/usernameRightClickBehaviorWithModifier",
UsernameRightClickBehavior::Reply,
};
EnumSetting<Qt::KeyboardModifier> usernameRightClickModifier = {
"/behaviour/usernameRightClickModifier",
Qt::KeyboardModifier::ShiftModifier};
BoolSetting autoSubToParticipatedThreads = {
"/behaviour/autoSubToParticipatedThreads",
true,