mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
[Client] Add setting to ignore all private messages (#7260)
* [Client] Add setting to ignore all private messages (#1250) * Early return --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
fff506dbbe
commit
760fe88fa3
7 changed files with 40 additions and 0 deletions
|
|
@ -65,6 +65,11 @@ bool ChatSettings::getRoomHistory() const
|
|||
return getValue("roomHistory", QString(), QString(), true).toBool();
|
||||
}
|
||||
|
||||
bool ChatSettings::getIgnoreAllPrivateMessages() const
|
||||
{
|
||||
return getValue("ignoreAllPrivateMessages", QString(), QString(), false).toBool();
|
||||
}
|
||||
|
||||
QString ChatSettings::getHighlightWords() const
|
||||
{
|
||||
return getValue("highlightWords").toString();
|
||||
|
|
@ -131,6 +136,11 @@ void ChatSettings::setRoomHistory(bool _roomHistory)
|
|||
setValue(_roomHistory, "roomHistory");
|
||||
}
|
||||
|
||||
void ChatSettings::setIgnoreAllPrivateMessages(bool _ignoreAllPrivateMessages)
|
||||
{
|
||||
setValue(_ignoreAllPrivateMessages, "ignoreAllPrivateMessages");
|
||||
}
|
||||
|
||||
void ChatSettings::setHighlightWords(const QString &_highlightWords)
|
||||
{
|
||||
setValue(_highlightWords, "highlightWords");
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ public:
|
|||
[[nodiscard]] bool getShowMessagePopup() const override;
|
||||
[[nodiscard]] bool getShowMentionPopup() const override;
|
||||
[[nodiscard]] bool getRoomHistory() const override;
|
||||
[[nodiscard]] bool getIgnoreAllPrivateMessages() const override;
|
||||
[[nodiscard]] QString getHighlightWords() const override;
|
||||
|
||||
void setChatMention(bool _chatMention);
|
||||
|
|
@ -37,6 +38,7 @@ public:
|
|||
void setShowMessagePopups(bool _showMessagePopups);
|
||||
void setShowMentionPopups(bool _showMentionPopups);
|
||||
void setRoomHistory(bool _roomHistory);
|
||||
void setIgnoreAllPrivateMessages(bool _ignoreAllPrivateMessages);
|
||||
void setHighlightWords(const QString &_highlightWords);
|
||||
|
||||
signals:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue