mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't remove last gift on unpin if all loaded.
This commit is contained in:
parent
b843f91b3c
commit
08c07a0785
1 changed files with 4 additions and 1 deletions
|
@ -274,7 +274,10 @@ void InnerWidget::markUnpinned(std::vector<Entry>::iterator i) {
|
||||||
}
|
}
|
||||||
++after;
|
++after;
|
||||||
}
|
}
|
||||||
if (after == _entries.size()) {
|
if (after == _entries.size() && !_allLoaded) {
|
||||||
|
// We don't know if the correct position is exactly in the end
|
||||||
|
// of the loaded part or later, so we hide it for now, let it
|
||||||
|
// be loaded later while scrolling.
|
||||||
_entries.erase(i);
|
_entries.erase(i);
|
||||||
} else if (after > index + 1) {
|
} else if (after > index + 1) {
|
||||||
std::rotate(i, i + 1, begin(_entries) + after);
|
std::rotate(i, i + 1, begin(_entries) + after);
|
||||||
|
|
Loading…
Add table
Reference in a new issue