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:
@@ -253,8 +253,6 @@ private:
|
||||
|
||||
deleted = this->chunks_->front()->at(this->firstChunkOffset_);
|
||||
|
||||
this->firstChunkOffset_++;
|
||||
|
||||
// need to delete the first chunk
|
||||
if (this->firstChunkOffset_ == this->chunks_->front()->size() - 1)
|
||||
{
|
||||
@@ -275,6 +273,11 @@ private:
|
||||
this->chunks_ = newVector;
|
||||
this->firstChunkOffset_ = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->firstChunkOffset_++;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user