mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
make whispers not disabled on clear
This commit is contained in:
parent
3f41dfeff9
commit
1a1d0f305c
7 changed files with 9 additions and 5 deletions
|
@ -179,7 +179,8 @@ void Channel::disableAllMessages()
|
||||||
for (int i = 0; i < snapshotLength; i++)
|
for (int i = 0; i < snapshotLength; i++)
|
||||||
{
|
{
|
||||||
auto &message = snapshot[i];
|
auto &message = snapshot[i];
|
||||||
if (message->flags.hasAny({MessageFlag::System, MessageFlag::Timeout}))
|
if (message->flags.hasAny({MessageFlag::System, MessageFlag::Timeout,
|
||||||
|
MessageFlag::Whisper}))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace chatterino {
|
||||||
|
|
||||||
struct Message;
|
struct Message;
|
||||||
using MessagePtr = std::shared_ptr<const Message>;
|
using MessagePtr = std::shared_ptr<const Message>;
|
||||||
enum class MessageFlag : uint16_t;
|
enum class MessageFlag : uint32_t;
|
||||||
using MessageFlags = FlagsEnum<MessageFlag>;
|
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||||
|
|
||||||
class Channel : public std::enable_shared_from_this<Channel>
|
class Channel : public std::enable_shared_from_this<Channel>
|
||||||
|
|
|
@ -200,6 +200,7 @@ QString CommandController::execCommand(const QString &textNoEmoji,
|
||||||
}
|
}
|
||||||
|
|
||||||
b->flags.set(MessageFlag::DoNotTriggerNotification);
|
b->flags.set(MessageFlag::DoNotTriggerNotification);
|
||||||
|
b->flags.set(MessageFlag::Whisper);
|
||||||
auto messagexD = b.release();
|
auto messagexD = b.release();
|
||||||
|
|
||||||
app->twitch.server->whispersChannel->addMessage(messagexD);
|
app->twitch.server->whispersChannel->addMessage(messagexD);
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
class MessageElement;
|
class MessageElement;
|
||||||
|
|
||||||
enum class MessageFlag : uint16_t {
|
enum class MessageFlag : uint32_t {
|
||||||
None = 0,
|
None = 0,
|
||||||
System = (1 << 0),
|
System = (1 << 0),
|
||||||
Timeout = (1 << 1),
|
Timeout = (1 << 1),
|
||||||
|
@ -30,6 +30,7 @@ enum class MessageFlag : uint16_t {
|
||||||
DoNotLog = (1 << 13),
|
DoNotLog = (1 << 13),
|
||||||
AutoMod = (1 << 14),
|
AutoMod = (1 << 14),
|
||||||
RecentMessage = (1 << 15),
|
RecentMessage = (1 << 15),
|
||||||
|
Whisper = (1 << 16)
|
||||||
};
|
};
|
||||||
using MessageFlags = FlagsEnum<MessageFlag>;
|
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class QPainter;
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
enum class MessageFlag : uint16_t;
|
enum class MessageFlag : uint32_t;
|
||||||
using MessageFlags = FlagsEnum<MessageFlag>;
|
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||||
|
|
||||||
struct Margin {
|
struct Margin {
|
||||||
|
|
|
@ -248,6 +248,7 @@ void IrcMessageHandler::handleWhisperMessage(Communi::IrcMessage *message)
|
||||||
|
|
||||||
if (!builder.isIgnored())
|
if (!builder.isIgnored())
|
||||||
{
|
{
|
||||||
|
builder->flags.set(MessageFlag::Whisper);
|
||||||
MessagePtr _message = builder.build();
|
MessagePtr _message = builder.build();
|
||||||
|
|
||||||
app->twitch.server->lastUserThatWhisperedMe.set(builder.userName);
|
app->twitch.server->lastUserThatWhisperedMe.set(builder.userName);
|
||||||
|
|
|
@ -25,7 +25,7 @@ using ChannelPtr = std::shared_ptr<Channel>;
|
||||||
struct Message;
|
struct Message;
|
||||||
using MessagePtr = std::shared_ptr<const Message>;
|
using MessagePtr = std::shared_ptr<const Message>;
|
||||||
|
|
||||||
enum class MessageFlag : uint16_t;
|
enum class MessageFlag : uint32_t;
|
||||||
using MessageFlags = FlagsEnum<MessageFlag>;
|
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||||
|
|
||||||
class MessageLayout;
|
class MessageLayout;
|
||||||
|
|
Loading…
Reference in a new issue