mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fix a bug with messages jumping if you were scrolled up
The bug appeared every 100 messages (so whenever a chunk was deleted) To fix this, we only perform the first chunk offset increment if the item we deleted was not the last item in a chunk
This commit is contained in:
parent
c631434cee
commit
64dc7f5d73
1 changed files with 5 additions and 2 deletions
|
@ -253,8 +253,6 @@ private:
|
||||||
|
|
||||||
deleted = this->chunks_->front()->at(this->firstChunkOffset_);
|
deleted = this->chunks_->front()->at(this->firstChunkOffset_);
|
||||||
|
|
||||||
this->firstChunkOffset_++;
|
|
||||||
|
|
||||||
// need to delete the first chunk
|
// need to delete the first chunk
|
||||||
if (this->firstChunkOffset_ == this->chunks_->front()->size() - 1)
|
if (this->firstChunkOffset_ == this->chunks_->front()->size() - 1)
|
||||||
{
|
{
|
||||||
|
@ -275,6 +273,11 @@ private:
|
||||||
this->chunks_ = newVector;
|
this->chunks_ = newVector;
|
||||||
this->firstChunkOffset_ = 0;
|
this->firstChunkOffset_ = 0;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->firstChunkOffset_++;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue