Added trashcan, replaced messageID var with this-message().id, removed pubsub stuff that didn't belong
This commit is contained in:
@@ -217,18 +217,12 @@ void Channel::deleteMessage(QString messageID)
|
||||
LimitedQueueSnapshot<MessagePtr> snapshot = this->getMessageSnapshot();
|
||||
int snapshotLength = snapshot.size();
|
||||
|
||||
int end = std::max(0, snapshotLength - 20);
|
||||
int end = std::max(0, snapshotLength - 200);
|
||||
|
||||
QTime minimumTime = QTime::currentTime().addSecs(-5);
|
||||
for (int i = snapshotLength - 1; i >= end; --i)
|
||||
{
|
||||
auto &s = snapshot[i];
|
||||
|
||||
if (s->parseTime < minimumTime)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (s->id == messageID)
|
||||
{
|
||||
s->flags.set(MessageFlag::Disabled);
|
||||
|
||||
Reference in New Issue
Block a user