Added trashcan, replaced messageID var with this-message().id, removed pubsub stuff that didn't belong

This commit is contained in:
apa420
2019-04-28 02:25:05 +02:00
parent 4f79d6fc07
commit 3c1d264689
10 changed files with 13 additions and 18 deletions
+1 -7
View File
@@ -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);